import { BaseException , ErrorCodeType , MetadataType } from './BaseException' ; import { IError , ECodes } from './code.types' ; export const UNAUTHENTICATED = { code : ECodes . UNAUTHENTICATED , message : 'Unauthenticated' , } ; export const TOKEN_INVALID = { code : ECodes . TOKEN_INVALID , message : 'Token invalid' , } ; export const TOKEN_EXPIRED = { code : ECodes . TOKEN_EXPIRED , message : 'Token expired' , } ; export const AUTH_CREDENTIALS_INVALID = { code : ECodes . AUTH_CREDENTIALS_INVALID , message : 'Auth credentials invalid' , } ; export class UnauthenticatedException extends BaseException { constructor ( customCode ? , metadata = { } ) { super ( customCode || UNAUTHENTICATED , metadata ) ; } }