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

Handle 401s more gracefully... #53

Closed
petems opened this issue Aug 1, 2013 · 5 comments · Fixed by #55
Closed

Handle 401s more gracefully... #53

petems opened this issue Aug 1, 2013 · 5 comments · Fixed by #55

Comments

@petems
Copy link
Owner

petems commented Aug 1, 2013

Related to #52

We should handle credentials being incorrect/expired in a nicer way. I think we'll have to do this upstream on digital_ocean and then pull in the changes.

We can have some sort of "Catch Faraday 401 error, tell the user to check their credentials and then exit" rather than the default full stacktrace that Faraday provides.

@pearkes
Copy link
Collaborator

pearkes commented Aug 2, 2013

Yea, the current implementation is really naive...working with what we have I guess.

My only concern with this – and maybe I'm alone in this opinion, please say so – is that it's a lot of extra HTTP calls for small UX benefit. I totally see the pluses, I just wish we didn't have to do something so expensive.

What do you thing @blom? Interesting to get another perspective here.

@pearkes
Copy link
Collaborator

pearkes commented Aug 2, 2013

OH! And by "this" I mean this branch, sorry.

I thought about doing something similar, but, yea, above.

@petems
Copy link
Owner Author

petems commented Aug 2, 2013

Yeah, that branch was me figuring out how hard it would be to do on tugboat, realised it was easier use the built in faraday middleware upstream 👍

@blom
Copy link
Collaborator

blom commented Aug 3, 2013

Yeah, I agree with @pearkes and for the same reasons.

petems added a commit that referenced this issue Aug 6, 2013
Means we can fix issues such as #53 and #42 without having to wait for
upstream changes on faraday itself and digital_ocean
@petems
Copy link
Owner Author

petems commented Aug 6, 2013

Ok, started from scratch so we can use our own custom middleware to catch status errors, much better solution, still a WIP but you can see what I'm aiming at: https://github.com/pearkes/tugboat/tree/pm_custom_faraday

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

Successfully merging a pull request may close this issue.

3 participants