Skip to content

Commit d1fab7e

Browse files
authored
fix: add underlyingException to FirebaseJsonException when projectId or appId are missing (#364)
1 parent b048aad commit d1fab7e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/flutterfire_cli/lib/src/commands/upload_symbols.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,10 @@ class UploadCrashlyticsSymbols extends FlutterFireCommand {
313313
}
314314

315315
if (projectId == null || appId == null) {
316-
throw FirebaseJsonException();
316+
final underlyingException =
317+
projectId == null ? 'projectId is missing.' : 'appId is missing.';
318+
319+
throw FirebaseJsonException(underlyingException: underlyingException);
317320
}
318321

319322
return ConfigurationResults(

packages/flutterfire_cli/lib/src/common/strings.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class FirebaseJsonException implements FlutterFireException {
136136
final String? underlyingException;
137137
@override
138138
String toString() {
139-
return 'FirebaseJsonException: Please run "flutterfire configure" to update the `firebase.json` at the root of your Flutter project with correct values. ${underlyingException != null ? '' : underlyingException}';
139+
return 'FirebaseJsonException: Please run "flutterfire configure" to update the `firebase.json` at the root of your Flutter project with correct values. ${underlyingException ?? ''}';
140140
}
141141
}
142142

0 commit comments

Comments
 (0)