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

Return clear error message when CIDR string is invalid in policy #1763

Closed
micahlee opened this issue Aug 19, 2020 · 1 comment
Closed

Return clear error message when CIDR string is invalid in policy #1763

micahlee opened this issue Aug 19, 2020 · 1 comment
Assignees

Comments

@micahlee
Copy link
Contributor

Currently, loading a policy with an invalid CIDR value value fails with a postgres exception and a 500 Internal Server Error response. Instead this should return a structured policy validation error like we have for other validations:

{
  "error": {
    "code": "validation_failed",
    "message": "policy_text Error at line 2, column 39 in  ...ge\":\"Error at line 2, column 39 in  : No such attribute 'restricted_to' on type HostFactory\""
  }
}
@micahlee
Copy link
Contributor Author

This is implemented in #1762

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

No branches or pull requests

2 participants