Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/http_error/mod.ts>isErrorResponse

An error class for HTTP requests.
Latest
function isErrorResponse
import { isErrorResponse } from "https://deno.land/x/http_error@0.7.0/mod.ts";

Check if the response is an error response that can be converted to an HttpError.

Type Parameters

optional
T extends Record<string, unknown> = Record<string, unknown>

Parameters

response: unknown

Returns

response is ErrorResponse<T>