Skip to main content
Module

x/acorn/util.ts>responseFromHttpError

A focused RESTful server framework for Deno 🌰🦕
Go to Latest
function responseFromHttpError
import { responseFromHttpError } from "https://deno.land/x/acorn@0.2.0/util.ts";

Generate a Response based on the original Request and an HttpError. It will ensure negotiation of the content type and will provide the stack trace in errors that are marked as exposeable.

Parameters

request: Request
error: HttpError
preferJson: boolean