File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed
Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,3 @@ export const Auth0Client = jest.fn(() => {
2727 logout,
2828 } ;
2929} ) ;
30-
31- export class GenericError extends Error {
32- constructor ( public error : string , public error_description : string ) {
33- super ( error_description ) ;
34- Object . setPrototypeOf ( this , GenericError . prototype ) ;
35- }
36- }
Original file line number Diff line number Diff line change 1- import { GenericError } from "@auth0/auth0-spa-js" ;
2-
31/**
42 * An OAuth2 error will come from the authorization server and will have at least an `error` property which will
53 * be the error code. And possibly an `error_description` property
64 *
75 * See: https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.1.2.6
86 */
9- export class OAuthError extends GenericError {
10- constructor ( error : string , error_description ?: string ) {
11- super ( error , error_description || error ) ;
7+ export class OAuthError extends Error {
8+ constructor ( public error : string , public error_description ?: string ) {
9+ super ( error_description || error ) ;
1210
1311 // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
1412 Object . setPrototypeOf ( this , OAuthError . prototype ) ;
You can’t perform that action at this time.
0 commit comments