Skip to content

@adrianhall/cloudflare-toolkit


@adrianhall/cloudflare-toolkit / index / statusToPhrase

Function: statusToPhrase()

statusToPhrase(status): string | undefined

Defined in: src/lib/problem-details/status.ts:64

Look up the standard HTTP reason phrase for a status code (e.g. 404"Not Found").

Parameters

status

number

The HTTP status code.

Returns

string | undefined

The reason phrase, or undefined if the status code is not recognized.