We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5be231d commit c58c9a9Copy full SHA for c58c9a9
lib/apis/base_api_client.dart
@@ -179,11 +179,15 @@ abstract class BaseApiClient {
179
if (exception is ServerException ||
180
error.type == DioExceptionType.unknown ||
181
error.type == DioExceptionType.badCertificate) {
182
- FirebaseCrashlytics.instance.recordError(
183
- exception,
184
- error.stackTrace,
185
- reason: '${error.requestOptions.method} ${error.requestOptions.uri}',
186
- );
+ try {
+ FirebaseCrashlytics.instance.recordError(
+ exception,
+ error.stackTrace,
+ reason: '${error.requestOptions.method} ${error.requestOptions.uri}',
187
+ );
188
+ } catch (_) {
189
+ // Firebase may not be initialized (e.g., in tests).
190
+ }
191
}
192
193
return exception;
0 commit comments