Show better error message for invalid JSON #639

Merged
merged 2 commits into from Feb 11, 2014

Conversation

Projects
None yet
2 participants
Member

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 ...}]

jamesls added some commits Feb 7, 2014

Show better error message for invalid JSON
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 ...}]
Contributor

toastdriven commented Feb 11, 2014

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

1 check passed

default The Travis CI build passed
Details

@jamesls jamesls deleted the jamesls:multi-json-arg branch Jun 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment