import { HttpError } from "https://deno.land/x/udibo_react_app@0.15.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);
Parameters
error: HttpError<T> | Error | unknown