Skip to content

Commit

Permalink
fix(core): improve amplify configure api error message (#5021)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikaHsn authored and hahnandrew committed Jun 24, 2024
1 parent 9796479 commit 2de8c95
Show file tree
Hide file tree
Showing 73 changed files with 1,175 additions and 446 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 2de8c95

Please sign in to comment.