Skip to content

@adrianhall/cloudflare-toolkit


@adrianhall/cloudflare-toolkit / index / unauthorized

Function: unauthorized()

unauthorized(input?): ProblemDetailsError

Defined in: src/lib/errors/generators.ts:44

Create a 401 Unauthorized ProblemDetailsError.

Parameters

input?

HttpErrorInput<Record<string, unknown>>

Optional problem details fields (detail, type, instance, extensions).

Returns

ProblemDetailsError

A 401-status ProblemDetailsError ready to throw.