()
| 23 | } |
| 24 | |
| 25 | toResponse(): IApiErrorResponse { |
| 26 | return { |
| 27 | success: false, |
| 28 | error: { |
| 29 | code: this.code, |
| 30 | message: this.message, |
| 31 | ...(this.details !== undefined && { details: this.details }), |
| 32 | ...(this.fieldErrors !== undefined && { |
| 33 | fieldErrors: this.fieldErrors, |
| 34 | }), |
| 35 | timestamp: now(), |
| 36 | }, |
| 37 | }; |
| 38 | } |
| 39 | } |
no test coverage detected