-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bring more exceptions up to runtime exception standards
- Loading branch information
Showing
33 changed files
with
226 additions
and
121 deletions.
There are no files selected for viewing
11 changes: 8 additions & 3 deletions
11
packages/nestjs-auth-apple/src/exceptions/auth-apple-decode.exception.ts
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthAppleDecodeException extends RuntimeException { | ||
constructor(message = 'Apple token was not able to be decoded.') { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'Apple token was not able to be decoded.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_APPLE_DECODE_ERROR'; | ||
} | ||
} |
11 changes: 8 additions & 3 deletions
11
packages/nestjs-auth-apple/src/exceptions/auth-apple-email-not-verified.exception.ts
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthAppleEmailNotVerifiedException extends RuntimeException { | ||
constructor(message = 'Apple email not is verified.') { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'Apple email not is verified.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_APPLE_EMAIL_NOT_VERIFIED'; | ||
} | ||
} |
11 changes: 8 additions & 3 deletions
11
packages/nestjs-auth-apple/src/exceptions/auth-apple-invalid-audience.exception.ts
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthAppleInvalidAudienceException extends RuntimeException { | ||
constructor(message = 'Apple audience is not valid.') { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'Apple audience is not valid.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_APPLE_INVALID_AUDIENCE'; | ||
} | ||
} |
11 changes: 8 additions & 3 deletions
11
packages/nestjs-auth-apple/src/exceptions/auth-apple-invalid-issuer.exception.ts
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthAppleInvalidIssuerException extends RuntimeException { | ||
constructor(message = 'Apple token issuer is not valid.') { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'Apple token issuer is not valid.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_APPLE_INVALID_ISSUER'; | ||
} | ||
} |
11 changes: 8 additions & 3 deletions
11
packages/nestjs-auth-apple/src/exceptions/auth-apple-missing-email.exception.ts
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthAppleMissingEmailException extends RuntimeException { | ||
constructor(message = 'Apple did not return an email address for the user.') { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'Apple did not return an email address for the user.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_APPLE_MISSING_PROFILE_EMAIL_ERROR'; | ||
} | ||
} |
11 changes: 8 additions & 3 deletions
11
packages/nestjs-auth-apple/src/exceptions/auth-apple-missing-id.exception.ts
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthAppleMissingIdException extends RuntimeException { | ||
constructor(message = 'Apple did not return an id for the user.') { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'Apple did not return an id for the user.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_APPLE_MISSING_PROFILE_ID_ERROR'; | ||
} | ||
} |
11 changes: 8 additions & 3 deletions
11
packages/nestjs-auth-apple/src/exceptions/auth-apple-public-key.exception.ts
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthApplePublicKeyException extends RuntimeException { | ||
constructor(message = 'Apple public key was not able to be retrieved.') { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'Apple public key was not able to be retrieved.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_APPLE_PUBLIC_KEY_ERROR'; | ||
} | ||
} |
11 changes: 8 additions & 3 deletions
11
packages/nestjs-auth-apple/src/exceptions/auth-apple-token-expired.exception.ts
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthAppleTokenExpiredException extends RuntimeException { | ||
constructor(message = 'Apple oauth token has expired.') { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'Apple oauth token has expired.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_APPLE_OAUTH_TOKEN_EXPIRED'; | ||
} | ||
} |
13 changes: 8 additions & 5 deletions
13
packages/nestjs-auth-github/src/exceptions/auth-github-missing-email.exception.ts
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthGithubMissingEmailException extends RuntimeException { | ||
constructor( | ||
message = 'GitHub did not return an email address for the user.', | ||
) { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'GitHub did not return an email address for the user.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_GITHUB_MISSING_PROFILE_EMAIL_ERROR'; | ||
} | ||
} |
11 changes: 8 additions & 3 deletions
11
packages/nestjs-auth-github/src/exceptions/auth-github-missing-id.exception.ts
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthGithubMissingIdException extends RuntimeException { | ||
constructor(message = 'GitHub did not return an id for the user.') { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'GitHub did not return an id for the user.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_GITHUB_MISSING_PROFILE_ID_ERROR'; | ||
} | ||
} |
13 changes: 8 additions & 5 deletions
13
packages/nestjs-auth-google/src/exceptions/auth-google-missing-email.exception.ts
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthGoogleMissingEmailException extends RuntimeException { | ||
constructor( | ||
message = 'Google did not return an email address for the user.', | ||
) { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'Google did not return an email address for the user.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_GOOGLE_MISSING_PROFILE_EMAIL_ERROR'; | ||
} | ||
} |
11 changes: 8 additions & 3 deletions
11
packages/nestjs-auth-google/src/exceptions/auth-google-missing-id.exception.ts
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { RuntimeException } from '@concepta/nestjs-exception'; | ||
import { | ||
RuntimeException, | ||
RuntimeExceptionOptions, | ||
} from '@concepta/nestjs-exception'; | ||
|
||
export class AuthGoogleMissingIdException extends RuntimeException { | ||
constructor(message = 'Google did not return an id for the user.') { | ||
constructor(options?: RuntimeExceptionOptions) { | ||
super({ | ||
safeMessage: message, | ||
safeMessage: 'Google did not return an id for the user.', | ||
...options, | ||
}); | ||
|
||
this.errorCode = 'AUTH_GOOGLE_MISSING_PROFILE_ID_ERROR'; | ||
} | ||
} |
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
13 changes: 7 additions & 6 deletions
13
packages/nestjs-federated/src/exceptions/federated-user-relationship.exception.ts
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
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
10 changes: 7 additions & 3 deletions
10
packages/nestjs-file/src/exceptions/file-id-missing.exception.ts
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
13 changes: 7 additions & 6 deletions
13
packages/nestjs-file/src/exceptions/file-storage-service-not-found.exception.ts
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
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
Oops, something went wrong.