MCPcopy Create free account
hub / github.com/denoland/std / isClientErrorStatus

Function isClientErrorStatus

http/status.ts:408–412  ·  view source on GitHub ↗
(
  status: number,
)

Source from the content-addressed store, hash-verified

406 * @returns Whether or not the provided status is a client error status code.
407 */
408export function isClientErrorStatus(
409 status: number,
410): status is ClientErrorStatus {
411 return isStatus(status) && status >= 400 && status < 500;
412}
413
414/**
415 * A type guard that determines if the status code is a server error.

Callers 1

fnFunction · 0.90

Calls 1

isStatusFunction · 0.85

Tested by

no test coverage detected