@vardario/cognito-client 4.0.3 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/error.d.ts +2 -1
- package/lib/error.js +15 -14
- package/package.json +1 -1
package/lib/error.d.ts
CHANGED
|
@@ -365,7 +365,8 @@ export declare enum RevokeTokenException {
|
|
|
365
365
|
export type CognitoErrorType = 'CommonError' | 'InitAuthError' | 'RespondToAuthChallengeError' | 'SignUpError' | 'ConfirmSignUpError' | 'ChangePasswordError' | 'RevokeTokenError' | 'ForgotPasswordError' | 'ConfirmForgotPasswordError' | 'ResendConfirmationCodeError' | 'UpdateUserAttributesError' | 'VerifyUserAttributeError' | 'GlobalSignOutError';
|
|
366
366
|
export declare class CognitoError extends Error {
|
|
367
367
|
readonly errorType: CognitoErrorType;
|
|
368
|
-
|
|
368
|
+
readonly cognitoException: CommonException | InitiateAuthException | RespondToAuthChallengeException | SignUpException | ConfirmSignUpException | ChangePasswordException | RevokeTokenException | ForgotPasswordException | ConfirmForgotPasswordException | ResendConfirmationException | UpdateUserAttributesException | VerifyUserAttributeException | GlobalSignOutException;
|
|
369
|
+
constructor(message: string, errorType: CognitoErrorType, cognitoException: CommonException | InitiateAuthException | RespondToAuthChallengeException | SignUpException | ConfirmSignUpException | ChangePasswordException | RevokeTokenException | ForgotPasswordException | ConfirmForgotPasswordException | ResendConfirmationException | UpdateUserAttributesException | VerifyUserAttributeException | GlobalSignOutException);
|
|
369
370
|
}
|
|
370
371
|
export declare class CommonError extends CognitoError {
|
|
371
372
|
readonly cognitoException: CommonException;
|
package/lib/error.js
CHANGED
|
@@ -401,86 +401,87 @@ export var RevokeTokenException;
|
|
|
401
401
|
RevokeTokenException["UnsupportedTokenTypeException"] = "UnsupportedTokenTypeException";
|
|
402
402
|
})(RevokeTokenException || (RevokeTokenException = {}));
|
|
403
403
|
export class CognitoError extends Error {
|
|
404
|
-
constructor(message, errorType) {
|
|
404
|
+
constructor(message, errorType, cognitoException) {
|
|
405
405
|
super(message);
|
|
406
406
|
this.errorType = errorType;
|
|
407
|
+
this.cognitoException = cognitoException;
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
410
|
export class CommonError extends CognitoError {
|
|
410
411
|
constructor(message, cognitoException) {
|
|
411
|
-
super(message, 'CommonError');
|
|
412
|
+
super(message, 'CommonError', cognitoException);
|
|
412
413
|
this.cognitoException = cognitoException;
|
|
413
414
|
}
|
|
414
415
|
}
|
|
415
416
|
export class InitAuthError extends CognitoError {
|
|
416
417
|
constructor(message, cognitoException) {
|
|
417
|
-
super(message, 'InitAuthError');
|
|
418
|
+
super(message, 'InitAuthError', cognitoException);
|
|
418
419
|
this.cognitoException = cognitoException;
|
|
419
420
|
}
|
|
420
421
|
}
|
|
421
422
|
export class RespondToAuthChallengeError extends CognitoError {
|
|
422
423
|
constructor(message, cognitoException) {
|
|
423
|
-
super(message, 'RespondToAuthChallengeError');
|
|
424
|
+
super(message, 'RespondToAuthChallengeError', cognitoException);
|
|
424
425
|
this.cognitoException = cognitoException;
|
|
425
426
|
}
|
|
426
427
|
}
|
|
427
428
|
export class SignUpError extends CognitoError {
|
|
428
429
|
constructor(message, cognitoException) {
|
|
429
|
-
super(message, 'SignUpError');
|
|
430
|
+
super(message, 'SignUpError', cognitoException);
|
|
430
431
|
this.cognitoException = cognitoException;
|
|
431
432
|
}
|
|
432
433
|
}
|
|
433
434
|
export class ConfirmSignUpError extends CognitoError {
|
|
434
435
|
constructor(message, cognitoException) {
|
|
435
|
-
super(message, 'ConfirmSignUpError');
|
|
436
|
+
super(message, 'ConfirmSignUpError', cognitoException);
|
|
436
437
|
this.cognitoException = cognitoException;
|
|
437
438
|
}
|
|
438
439
|
}
|
|
439
440
|
export class ChangePasswordError extends CognitoError {
|
|
440
441
|
constructor(message, cognitoException) {
|
|
441
|
-
super(message, 'ChangePasswordError');
|
|
442
|
+
super(message, 'ChangePasswordError', cognitoException);
|
|
442
443
|
this.cognitoException = cognitoException;
|
|
443
444
|
}
|
|
444
445
|
}
|
|
445
446
|
export class RevokeTokenError extends CognitoError {
|
|
446
447
|
constructor(message, cognitoException) {
|
|
447
|
-
super(message, 'RevokeTokenError');
|
|
448
|
+
super(message, 'RevokeTokenError', cognitoException);
|
|
448
449
|
this.cognitoException = cognitoException;
|
|
449
450
|
}
|
|
450
451
|
}
|
|
451
452
|
export class ForgotPasswordError extends CognitoError {
|
|
452
453
|
constructor(message, cognitoException) {
|
|
453
|
-
super(message, 'ForgotPasswordError');
|
|
454
|
+
super(message, 'ForgotPasswordError', cognitoException);
|
|
454
455
|
this.cognitoException = cognitoException;
|
|
455
456
|
}
|
|
456
457
|
}
|
|
457
458
|
export class ConfirmForgotPasswordError extends CognitoError {
|
|
458
459
|
constructor(message, cognitoException) {
|
|
459
|
-
super(message, 'ConfirmForgotPasswordError');
|
|
460
|
+
super(message, 'ConfirmForgotPasswordError', cognitoException);
|
|
460
461
|
this.cognitoException = cognitoException;
|
|
461
462
|
}
|
|
462
463
|
}
|
|
463
464
|
export class ResendConfirmationCodeError extends CognitoError {
|
|
464
465
|
constructor(message, cognitoException) {
|
|
465
|
-
super(message, 'ResendConfirmationCodeError');
|
|
466
|
+
super(message, 'ResendConfirmationCodeError', cognitoException);
|
|
466
467
|
this.cognitoException = cognitoException;
|
|
467
468
|
}
|
|
468
469
|
}
|
|
469
470
|
export class UpdateUserAttributesError extends CognitoError {
|
|
470
471
|
constructor(message, cognitoException) {
|
|
471
|
-
super(message, 'UpdateUserAttributesError');
|
|
472
|
+
super(message, 'UpdateUserAttributesError', cognitoException);
|
|
472
473
|
this.cognitoException = cognitoException;
|
|
473
474
|
}
|
|
474
475
|
}
|
|
475
476
|
export class VerifyUserAttributeError extends CognitoError {
|
|
476
477
|
constructor(message, cognitoException) {
|
|
477
|
-
super(message, 'VerifyUserAttributeError');
|
|
478
|
+
super(message, 'VerifyUserAttributeError', cognitoException);
|
|
478
479
|
this.cognitoException = cognitoException;
|
|
479
480
|
}
|
|
480
481
|
}
|
|
481
482
|
export class GlobalSignOutError extends CognitoError {
|
|
482
483
|
constructor(message, cognitoException) {
|
|
483
|
-
super(message, 'GlobalSignOutError');
|
|
484
|
+
super(message, 'GlobalSignOutError', cognitoException);
|
|
484
485
|
this.cognitoException = cognitoException;
|
|
485
486
|
}
|
|
486
487
|
}
|