()
| 34 | } |
| 35 | |
| 36 | toEnvelope(): ErrorEnvelope { |
| 37 | const payload: ErrorEnvelope['error'] = { |
| 38 | code: this.code, |
| 39 | message: this.message, |
| 40 | } |
| 41 | if (this.hint !== undefined) |
| 42 | payload.hint = this.hint |
| 43 | return { error: payload } |
| 44 | } |
| 45 | |
| 46 | withHint<T extends BaseError>(this: T, hint: string): T { |
| 47 | const Ctor = this.constructor as new (opts: BaseErrorOptions) => T |
no outgoing calls
no test coverage detected