trong cái rủi có cái may

Idiom

 * 1) there is a silver lining in this instance of misfortune