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

Inconsistent handling of 403 responses #89

Closed
pmenglund opened this issue Jun 1, 2016 · 3 comments
Closed

Inconsistent handling of 403 responses #89

pmenglund opened this issue Jun 1, 2016 · 3 comments

Comments

@pmenglund
Copy link
Contributor

When you have a consul ACL in place, the exceptions your get from diplomat are inconsistent:

E.g. Diplomat::Acl.list raises

Diplomat::UnknownStatus: status 403

while Diplomat::Acl.create({}) raises

Faraday::ClientError: the server responded with status 403

which makes it messy to catch the exceptions and determine if authentication is needed.

@johnhamelink
Copy link
Member

@pmenglund Thanks for this issue. We simply need to check to see what the correct response code is, and if it's not the correct one, respond with Diplomat::UnknownStatus as with the list function.

@johnhamelink
Copy link
Member

Fixed in 492596e

@johnhamelink
Copy link
Member

Released in 0.19.0

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

No branches or pull requests

2 participants