-
Notifications
You must be signed in to change notification settings - Fork 27
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 400 errors from the authorization server #29
Comments
It depends on when exactly the 400 is being returned. Is the 400 status code the one returned from Instagram, or did the In case you do want or need to handle errors in the token exchange, you can use the #[get("/example")]
fn example_callback(token: Result<TokenResponse<GitHub>, rocket_oauth2::Error>, cookies: &CookieJar<'_>) -> Redirect { ... } |
Oh I see. I'll try that. This is the relevant part of the log.
|
Yeah, in this case it's Instagram responding with 400. I think you've actually stumbled on a long-unimplemented feature that I all but forgot: the authorization server can include a human-readable error description, but |
I was wondering if there is any way to handle custom status codes other than 200.
I get the redirect to callback_url with something like this
but with 400 bad request.
So my question is, Is there any simple way to handle the 400 status code ?
The text was updated successfully, but these errors were encountered: