View raw

1 (** Error pages. 2 3 These are deliberately self-contained rather than going through {!Layout}: 4 an error may be raised before a repository context exists, so the page can 5 depend on nothing but the status and message. *) 6 7 val render : 8 ?title:string -> 9 ?status:[< Dream.status > `Internal_Server_Error ] -> 10 string -> 11 Dream.response Dream.promise 12 (** Render an error page and respond with the given HTTP status. 13 14 @param title the heading shown on the page (default ["Request failed"]). 15 @param status the HTTP status code (default [`Internal_Server_Error]). *) 16