Replies: 1 comment
-
How about:
my $result = eval { await $c->oauth2->get_token_p($provider_name => \%get_token) };
if (my $err = $@) {
die 'error: ' . $err;
}
# check $result and do_something() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This morning my webapps had an issue. We're using
Mojolicious::Plugin::OAuth2
to auth users against Azure. Works perfectly fine, but not this time. Kept getting anunauthorized
error. When I then messed with the code ofMojolicious::Plugin::OAuth2
and changed apost_p
to a normal post and looked at the response, the content field actually fully explained the error.My question is this. When we're using a promise chain like
do we then have any chance of accessing the full error in the
catch
branch? Or are we doomed to only being able to access whatever is given to the reject part of the promise.Here
get_token_p
ends by returning apost_p
.Beta Was this translation helpful? Give feedback.
All reactions