Skip to content

Commit bc34363

Browse files
committed
expose Bad_req in Server
1 parent e5191f0 commit bc34363

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/core/server.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ open Common_
22

33
type resp_error = Response_code.t * string
44

5+
exception Bad_req = Common_.Bad_req
6+
57
module Middleware = struct
68
type handler = IO.Input.t Request.t -> resp:(Response.t -> unit) -> unit
79
type t = handler -> handler

src/core/server.mli

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
@since 0.13
99
*)
1010

11+
exception Bad_req of int * string
12+
(** Exception raised to exit request handlers with a code+error message *)
13+
1114
(** {2 Middlewares}
1215
1316
A middleware can be inserted in a handler to modify or observe

0 commit comments

Comments
 (0)