(inputs: RequestInputs | undefined)
| 47 | } |
| 48 | |
| 49 | export function stringifyRequestInputs(inputs: RequestInputs | undefined) { |
| 50 | try { |
| 51 | return JSON.stringify(inputs ?? {}); |
| 52 | } catch (error) { |
| 53 | return JSON.stringify({ |
| 54 | error: "request_inputs_json_stringify_failed", |
| 55 | message: error instanceof Error ? error.message : String(error), |
| 56 | }); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | async function requestBody(c: Context): Promise<unknown> { |
| 61 | if (!BODY_METHODS.has(c.req.method)) return undefined; |
no test coverage detected