File tree 2 files changed +3
-12
lines changed
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(() => {
27
27
logout,
28
28
} ;
29
29
} ) ;
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
-
3
1
/**
4
2
* An OAuth2 error will come from the authorization server and will have at least an `error` property which will
5
3
* be the error code. And possibly an `error_description` property
6
4
*
7
5
* See: https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.1.2.6
8
6
*/
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 ) ;
12
10
13
11
// https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
14
12
Object . setPrototypeOf ( this , OAuthError . prototype ) ;
You can’t perform that action at this time.
0 commit comments