RPC: print uri in RPC_context.Not_found

This commit is contained in:
Pietro Abate 2018-11-12 17:42:48 +01:00 committed by Benjamin Canou
parent 5cc9e6ccc6
commit 214055ac62

View File

@ -180,8 +180,8 @@ let () =
(obj2 (obj2
(req "method" RPC_service.meth_encoding) (req "method" RPC_service.meth_encoding)
(req "uri" uri_encoding)) (req "uri" uri_encoding))
~pp:(fun ppf (_meth, _uri) -> ~pp:(fun ppf (meth, uri) ->
Format.fprintf ppf "Did not find service") Format.fprintf ppf "Did not find service: %s %a" (RPC_service.string_of_meth meth) Uri.pp_hum uri)
(function Not_found { meth ; uri } -> Some (meth, uri) (function Not_found { meth ; uri } -> Some (meth, uri)
| _ -> None) | _ -> None)
(fun (meth, uri) -> Not_found { meth ; uri }) (fun (meth, uri) -> Not_found { meth ; uri })