Skip to content

Commit

Permalink
fix(core): improve amplify configure api error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Nika Hassani committed Jun 12, 2024
1 parent 3fe76c0 commit c2cd11f
Show file tree
Hide file tree
Showing 35 changed files with 667 additions and 272 deletions.
3 changes: 2 additions & 1 deletion packages/amplify_core/lib/src/amplify_class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ abstract class AmplifyClass {
try {
final json = jsonDecode(configuration) as Map;
amplifyConfig = AmplifyConfig.fromJson(json.cast());
} on Object {
} on Object catch (e) {
throw ConfigurationError(
'The provided configuration is not a valid json. '
'Check underlyingException.',
recoverySuggestion:
'Inspect your amplifyconfiguration.dart and ensure that '
'the string is proper json',
underlyingException: e,
);
}
await _configurePlugins(amplifyConfig);
Expand Down
56 changes: 37 additions & 19 deletions packages/amplify_core/lib/src/config/amplify_config.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions packages/amplify_core/lib/src/config/api/api_config.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 16 additions & 7 deletions packages/amplify_core/lib/src/config/api/appsync/api_config.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions packages/amplify_core/lib/src/config/auth/auth_config.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions packages/amplify_core/lib/src/config/auth/cognito/appsync.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 50 additions & 28 deletions packages/amplify_core/lib/src/config/auth/cognito/auth.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c2cd11f

Please sign in to comment.