isClientErrorStatus

import { isClientErrorStatus } from "jsr:@ende/http";

function

function isClientErrorStatus(status: number): status is ClientErrorStatus

A type guard that determines if the status code is a client error.

status: number

The status to assert against.

Returns

Whether or not the provided status is a client error status code.

Example: Usage

import { isClientErrorStatus } from "@ende/http/status";
import { assert } from "@ende/assert";

assert(isClientErrorStatus(404));

Source