Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Show any error response details if available #8

Closed
bahmutov opened this issue Nov 16, 2017 · 0 comments
Closed

Show any error response details if available #8

bahmutov opened this issue Nov 16, 2017 · 0 comments

Comments

@bahmutov
Copy link
Contributor

Noticed error response from Buildkite that was hiding the details in response.data field

data: { message: 'Validation Failed', errors: [Object] } } }

If the response error has this field, show it in the console before throwing the error. In this case it was showing

error response data
{ message: 'Validation Failed',
  errors: 
   [ { field: 'env',
       code: '"_aws_credentials_json" is not a valid environment variable name (only a-z, A-Z, 0-9 and underscores are allowed)',
       value: [Object] } ] }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant