Don't report Google Drive HTTP 401 or 503 errors

pull/1137/head
Alex Baker 4 years ago
parent 721d1cb647
commit 3b3fe34d22

@ -68,6 +68,21 @@ class DriveUploader @WorkerInject constructor(
} catch (e: UnknownHostException) { } catch (e: UnknownHostException) {
Timber.e(e) Timber.e(e)
Result.retry() Result.retry()
} catch (e: GoogleJsonResponseException) {
when (e.statusCode) {
401 -> {
Timber.e(e)
Result.failure()
}
503 -> {
Timber.e(e)
Result.retry()
}
else -> {
firebase.reportException(e)
Result.retry()
}
}
} catch (e: IOException) { } catch (e: IOException) {
firebase.reportException(e) firebase.reportException(e)
Result.failure() Result.failure()

Loading…
Cancel
Save