Fix crash if you search for a malformed username.

This commit is contained in:
Greyson Parrelli
2023-11-29 10:09:43 -05:00
committed by Cody Henthorne
parent 38cf3f40e1
commit 075df8a26d

View File

@@ -219,6 +219,9 @@ object UsernameRepository {
} catch (e: UsernameIsNotAssociatedWithAnAccountException) {
Log.w(TAG, "[fetchAciFromUsername] Failed to get ACI for username hash", e)
UsernameAciFetchResult.NotFound
} catch (e: BaseUsernameException) {
Log.w(TAG, "[fetchAciFromUsername] Invalid username", e)
UsernameAciFetchResult.NotFound
} catch (e: IOException) {
Log.w(TAG, "[fetchAciFromUsername] Hit network error while trying to resolve ACI from username", e)
UsernameAciFetchResult.NetworkError