(r: Request)
| 2 | |
| 3 | export class AuthErrorResponse extends Response { |
| 4 | constructor(r: Request) { |
| 5 | const jsonBody = JSON.stringify({ |
| 6 | errors: [ |
| 7 | { |
| 8 | code: "UNAUTHORIZED", |
| 9 | message: "authentication required", |
| 10 | detail: null, |
| 11 | }, |
| 12 | ], |
| 13 | }); |
| 14 | const init = { |
| 15 | status: 401, |
| 16 | headers: { |
| 17 | "content-type": "application/json;charset=UTF-8", |
| 18 | "WWW-Authenticate": `Basic realm="${r.url}"`, |
| 19 | }, |
| 20 | }; |
| 21 | super(jsonBody, init); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | export class RangeError extends Response { |
nothing calls this directly
no outgoing calls
no test coverage detected