We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5191f0 commit bc34363Copy full SHA for bc34363
src/core/server.ml
@@ -2,6 +2,8 @@ open Common_
2
3
type resp_error = Response_code.t * string
4
5
+exception Bad_req = Common_.Bad_req
6
+
7
module Middleware = struct
8
type handler = IO.Input.t Request.t -> resp:(Response.t -> unit) -> unit
9
type t = handler -> handler
src/core/server.mli
@@ -8,6 +8,9 @@
@since 0.13
*)
10
11
+exception Bad_req of int * string
12
+(** Exception raised to exit request handlers with a code+error message *)
13
14
(** {2 Middlewares}
15
16
A middleware can be inserted in a handler to modify or observe
0 commit comments