(status: number, body: IApiErrorBody)
| 8 | public readonly requestId: string | undefined; |
| 9 | |
| 10 | public constructor(status: number, body: IApiErrorBody) { |
| 11 | super(body.message); |
| 12 | this.name = "ApiError"; |
| 13 | this.status = status; |
| 14 | this.code = body.code; |
| 15 | this.fieldErrors = body.fieldErrors; |
| 16 | this.details = body.details; |
| 17 | this.requestId = body.requestId; |
| 18 | } |
| 19 | |
| 20 | public get isUnauthorized(): boolean { |
| 21 | return this.status === 401; |
nothing calls this directly
no outgoing calls
no test coverage detected