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

Bitbucket API errors are not visible #6

Open
ebuildy opened this issue Apr 19, 2016 · 0 comments
Open

Bitbucket API errors are not visible #6

ebuildy opened this issue Apr 19, 2016 · 0 comments

Comments

@ebuildy
Copy link

ebuildy commented Apr 19, 2016

On method Strategy.prototype.userProfile, we lost error reason because:

if (err) {
      if (!(err instanceof Error)) {
        return done(new Error('Failed to fetch user profile'));
      }
      return done(new InternalOAuthError('Failed to fetch user profile', err));
    }

Whereas error could contain helpful information:

{"error": {
"message": "Your credentials lack one or more required privilege scopes.", 
"detail": {"granted": ["webhook", "project", "team", "email"], 
"required": ["account"]}}
}
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

1 participant