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

x/udibo_react_app/mod.tsx>HttpError.json

A React Framework for Deno that makes it easy to create highly interactive apps that have server side rendering with file based routing for both your UI and API.
Latest
method HttpError.json
Re-export
import { HttpError } from "https://deno.land/x/udibo_react_app@0.19.0/mod.tsx";

Converts an HttpError to an options object that can be used to re-create it. The message will only be included if the error should be exposed.

const error = new HttpError(400, "Invalid id");
const options = HttpError.json(error);
const copy = new HttpError(options);

Type Parameters

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

Parameters

error: HttpError<T> | Error | unknown