Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show better error message for invalid JSON #639

Merged
merged 2 commits into from
Feb 11, 2014

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Feb 7, 2014

Especially for list params, their error messages were not helpful.
Error messages now include the actual value itself, as we have seen
cases where customers specify valid JSON but the shell they're using
will process arguments and strip out characters such as quotes.
By showing the actual JSON contents it will make this more obvious.

Before:

  The value for parameter "--" must be JSON or path to file.

After:

  Error parsing parameter --block-device-mappings: Invalid JSON:
  [{ ...BAD JSON CONTENTS ...}]

Especially for list params, their error messages were not helpful.
Error messages now include the actual value itself, as we have seen
cases where customers specify valid JSON but the shell they're using
will process arguments and strip out characters such as quotes.
By showing the actual JSON contents it will make this more obvious.

Before:

  The value for parameter "--" must be JSON or path to file.

After:

  Error parsing parameter --block-device-mappings: Invalid JSON:
  [{ ...BAD JSON CONTENTS ...}]
@toastdriven
Copy link
Contributor

LGTM. :shipit:

jamesls added a commit that referenced this pull request Feb 11, 2014
@jamesls jamesls merged commit 2a95d9b into aws:develop Feb 11, 2014
@jamesls jamesls deleted the multi-json-arg branch June 23, 2014 18:28
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.

2 participants