Skip to content

Commit 9cbfe72

Browse files
authored
fix(core): improve amplify configure api error message (#5021)
1 parent 3fe76c0 commit 9cbfe72

File tree

73 files changed

+1175
-446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1175
-446
lines changed

packages/amplify_core/lib/src/amplify_class.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,14 @@ abstract class AmplifyClass {
117117
try {
118118
final json = jsonDecode(configuration) as Map;
119119
amplifyConfig = AmplifyConfig.fromJson(json.cast());
120-
} on Object {
120+
} on Object catch (e) {
121121
throw ConfigurationError(
122122
'The provided configuration is not a valid json. '
123123
'Check underlyingException.',
124124
recoverySuggestion:
125125
'Inspect your amplifyconfiguration.dart and ensure that '
126126
'the string is proper json',
127+
underlyingException: e,
127128
);
128129
}
129130
await _configurePlugins(amplifyConfig);

packages/amplify_core/lib/src/config/amplify_config.g.dart

Lines changed: 37 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify_core/lib/src/config/analytics/analytics_config.g.dart

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify_core/lib/src/config/analytics/pinpoint_config.g.dart

Lines changed: 31 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify_core/lib/src/config/api/api_config.g.dart

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify_core/lib/src/config/api/appsync/api_config.g.dart

Lines changed: 16 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify_core/lib/src/config/auth/auth_config.g.dart

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify_core/lib/src/config/auth/cognito/appsync.g.dart

Lines changed: 22 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify_core/lib/src/config/auth/cognito/auth.g.dart

Lines changed: 50 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify_core/lib/src/config/auth/cognito/credentials_provider.g.dart

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/amplify_core/lib/src/config/auth/cognito/identity_manager.g.dart

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)