diff --git a/src/modules/exceptions/index.ts b/src/modules/exceptions/index.ts index 443fb27..3c0373b 100755 --- a/src/modules/exceptions/index.ts +++ b/src/modules/exceptions/index.ts @@ -8,5 +8,6 @@ export * from './passive.exception'; export * from './redirect.exception'; export * from './redis.exception'; export * from './sql.exception'; +export * from './sso.exception'; export * from './unauthorized.exception'; export * from './validation.exception'; diff --git a/src/modules/exceptions/sso.exception.ts b/src/modules/exceptions/sso.exception.ts new file mode 100644 index 0000000..56ece92 --- /dev/null +++ b/src/modules/exceptions/sso.exception.ts @@ -0,0 +1,12 @@ +import { HttpStatus } from '@nestjs/common'; +import { LoggedException } from './logged.exception'; + +export class SsoException extends LoggedException { + constructor(error?: Error, customMessage?: string) { + super( + customMessage || 'Internal server error with SSO', + HttpStatus.INTERNAL_SERVER_ERROR, + error + ); + } +}