* Creates a terminal reply context that dies with the supplied defect. * * @since 4.0.0
(options: {
readonly id: Snowflake
readonly requestId: Snowflake
readonly defect: unknown
})
| 91 | * @since 4.0.0 |
| 92 | */ |
| 93 | static fromDefect(options: { |
| 94 | readonly id: Snowflake |
| 95 | readonly requestId: Snowflake |
| 96 | readonly defect: unknown |
| 97 | }): ReplyWithContext<any> { |
| 98 | return new ReplyWithContext({ |
| 99 | reply: new WithExit({ |
| 100 | requestId: options.requestId, |
| 101 | id: options.id, |
| 102 | exit: Exit.die(Schema.encodeSync(Schema.Defect())(options.defect)) |
| 103 | }), |
| 104 | context: Context.empty() as any, |
| 105 | rpc: neverRpc |
| 106 | }) |
| 107 | } |
| 108 | /** |
| 109 | * Creates a terminal reply context that interrupts the supplied request. |
| 110 | * |
no test coverage detected