isServerErrorStatus

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

function

function isServerErrorStatus(status: number): status is ServerErrorStatus

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

status: number

The status to assert against.

Returns

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

Example: Usage

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

assert(isServerErrorStatus(502));

Source