Http module

Client_Error

structSource

What the client returns when something went wrong. A handler's Http_Error is about answering with a status; this is about not getting, or not reading, an answer. error_text makes one line of it.

Fields

detail: string
what happened
transport: Io.Io_Error
for TRANSPORT and TIMED_OUT: the Io error behind it
json: Json_Error
for DECODE: where and why the JSON did not fit
status: int
For DECODE and STATUS: the response that was being read.
title: string
For STATUS: the reason phrase, or the title of a problem+json body, and the body text.
body: string
owned: bool
Set when the strings above were allocated for this error: release them with free_error.

See also