Skip to content

Commit

Permalink
fix: add underlyingException to FirebaseJsonException when projectId …
Browse files Browse the repository at this point in the history
…or appId are missing (#364)
  • Loading branch information
Leedwon authored Jan 23, 2025
1 parent b048aad commit d1fab7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ class UploadCrashlyticsSymbols extends FlutterFireCommand {
}

if (projectId == null || appId == null) {
throw FirebaseJsonException();
final underlyingException =
projectId == null ? 'projectId is missing.' : 'appId is missing.';

throw FirebaseJsonException(underlyingException: underlyingException);
}

return ConfigurationResults(
Expand Down
2 changes: 1 addition & 1 deletion packages/flutterfire_cli/lib/src/common/strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class FirebaseJsonException implements FlutterFireException {
final String? underlyingException;
@override
String toString() {
return 'FirebaseJsonException: Please run "flutterfire configure" to update the `firebase.json` at the root of your Flutter project with correct values. ${underlyingException != null ? '' : underlyingException}';
return 'FirebaseJsonException: Please run "flutterfire configure" to update the `firebase.json` at the root of your Flutter project with correct values. ${underlyingException ?? ''}';
}
}

Expand Down

0 comments on commit d1fab7e

Please sign in to comment.