Function
makeError
(status: number, error: string)
Source from the content-addressed store, hash-verified
| 90 | } |
| 91 | |
| 92 | function makeError(status: number, error: string): { status: number; headers: Record<string, string>; body: Buffer } { |
| 93 | const body = Buffer.from(JSON.stringify({ error }, sanitizeReplacer)); |
| 94 | return { |
| 95 | status, |
| 96 | headers: { 'content-type': 'application/json', 'content-length': String(body.length) }, |
| 97 | body, |
| 98 | }; |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * Determine whether the endpoint is allowed on the tailnet listener AND what |
Tested by
no test coverage detected