Skip to content

Conversation

AllanZhengYP
Copy link
Contributor

Now SDK throws error like:

{Error: 1 validation error detected: Value null at 'certificateArn' failed to satisfy constraint: Member must not be null 
...

After the change, the thrown error looks like:

{ValidationException: 1 validation error detected: Value null at 'certificateArn' failed to satisfy constraint: Member must not be null 
...

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@AllanZhengYP AllanZhengYP requested a review from kstich January 12, 2020 19:51
@mtdowling
Copy link
Member

Cool! Curious though -- how does adding "name" make this display better error messages?

@AllanZhengYP
Copy link
Contributor Author

@mtdowling name it's like error's "class" which doesn't exist in JavaScript. By default the error name is Error with different error message. Changing name makes it shows the error code from service side, like ValidationException or SignatureMismatchException

@trivikr
Copy link
Contributor

trivikr commented Jan 13, 2020

@mtdowling Merge?

@trivikr
Copy link
Contributor

trivikr commented Feb 3, 2020

AllanZhengYP pushed a commit to AllanZhengYP/aws-sdk-js-v3 that referenced this pull request Mar 20, 2020
trivikr added a commit to trivikr/aws-sdk-js-v3 that referenced this pull request Mar 20, 2020
trivikr added a commit to trivikr/aws-sdk-js-v3 that referenced this pull request Mar 24, 2020
trivikr added a commit to trivikr/aws-sdk-js-v3 that referenced this pull request Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants