Functor Restful.Error

module Error: 
functor (Log : LOG) -> ERROR

Default ERROR module suitable for Make. Generates simple text/plain errors. Also controls logging via its parameter, a module of type LOG. Typically parameterized as Error (Log.Default).

Parameters:
Log : LOG

type data 
val loginit : string list -> data
val handler : data ->
Restful.Types.mode ->
(Netcgi.cgi -> Nethttp.http_status) -> Netcgi.cgi -> unit

Type of function that handles errors. Takes a mode, a Restful.SERVICE.main function, and a CGI activation object. Typically will distinguish between Types.User_exn and all other exceptions, generating a 400 error for the former and a 500 error for the latter, but this is up to you.

The Restful.Error module provides a handy implementation of simple text/plain errors.