Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/capi/deps/std/http.ts>createHttpError

[WIP] A framework for crafting interactions with Substrate chains
Latest
function createHttpError
import { createHttpError } from "https://deno.land/x/capi@v0.1.1-beta.1/deps/std/http.ts";

A factory function which provides a way to create errors. It takes up to 3 arguments, the error Status, an message, which defaults to the status text and error options, which incudes the expose property to set the .expose value on the error.

Parameters

optional
status: ErrorStatus = [UNSUPPORTED]
optional
message: string
optional
options: HttpErrorOptions