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

agent: 400 error on invalid UUID format, api handles errors properly #4297

Merged
merged 1 commit into from
Jun 28, 2018

Conversation

mitchellh
Copy link
Contributor

Fixes #4292

This makes two changes:

  1. The intention HTTP endpoint returns a 400 for invalid ID values on read. This unfortunately has to be done with a gross strings.Contains since there is no surefire way I could find to detect this error, and there are a number of error cases which are not 400 code.

  2. API package for intentions reads the body for errors.

Both tested.

@mitchellh mitchellh requested a review from banks June 27, 2018 05:42
Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@mitchellh mitchellh merged commit e155d58 into master Jun 28, 2018
@mitchellh mitchellh deleted the b-intention-500-2 branch June 28, 2018 03:27
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.

None yet

2 participants