(
code: ErrorCode,
message: string,
statusCode = 500,
fieldErrors?: Record<string, string>,
details?: Record<string, unknown>
)
| 8 | public readonly details: Record<string, unknown> | undefined; |
| 9 | |
| 10 | constructor( |
| 11 | code: ErrorCode, |
| 12 | message: string, |
| 13 | statusCode = 500, |
| 14 | fieldErrors?: Record<string, string>, |
| 15 | details?: Record<string, unknown> |
| 16 | ) { |
| 17 | super(message); |
| 18 | this.name = "ApiError"; |
| 19 | this.code = code; |
| 20 | this.statusCode = statusCode; |
| 21 | this.fieldErrors = fieldErrors; |
| 22 | this.details = details; |
| 23 | } |
| 24 | |
| 25 | toResponse(): IApiErrorResponse { |
| 26 | return { |
nothing calls this directly
no outgoing calls
no test coverage detected