-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.InvalidScopeError = undefined; | ||
|
||
var _base = require('./base'); | ||
|
||
class InvalidScopeError extends _base.BaseError { | ||
static hasError() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
|
||
let body = _ref.body, | ||
status = _ref.status; | ||
|
||
if (!status || !body || !body.error) { | ||
return false; | ||
} | ||
|
||
if (status === 400 && body.error === 'invalid_scope') { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
constructor() { | ||
super('invalid_scope', ...arguments); | ||
} | ||
} | ||
exports.InvalidScopeError = InvalidScopeError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters