Class: LinoHttpError

LinoHttpError(status, detailopt, optionsopt)

An HTTP error that carries problem details.

Throwing one of these from a handler produces a conforming error response; the client library raises the same shape when a server answers with 4xx/5xx.

Constructor

new LinoHttpError(status, detailopt, optionsopt)

Parameters:
Name Type Attributes Description
status number

HTTP status code

detail string <optional>

Human readable explanation of this occurrence

options object <optional>

Additional problem members

Properties
Name Type Attributes Description
title string <optional>

Short, type-wide summary

type string <optional>

Problem type URI

instance string <optional>

URI of this occurrence

headers object <optional>

Response headers to send with the error

extensions object <optional>

Extra problem members

Source:

Classes

LinoHttpError

Methods

toProblem(instanceopt) → {object}

Render the error as the problem details object of the specification.

Parameters:
Name Type Attributes Description
instance string <optional>

URI of this occurrence when not already set

Source:
Returns:

Problem details ready to be encoded

Type
object