import { ErrorCodes } from './errors' ; export class AzureAuthError extends Error { constructor ( private errorCode , private readonly errorMessage , private readonly originalException ? ) { super ( errorMessage ) ; } getPrintableString ( ) { return JSON . stringify ( { errorCode : this . errorCode , errorMessage : this . errorMessage , originalException : this . originalException ?? '' } , undefined , ErrorCodes . AuthError ) ; } }