error logging on error in handle_command

This commit is contained in:
Hannes Mehnert 2018-11-03 00:04:47 +01:00
parent 7b3d94db8c
commit 79068c8abf

View file

@ -96,7 +96,7 @@ let handle_command t (header, payload) =
let msg_to_err = function let msg_to_err = function
| Ok x -> x | Ok x -> x
| Error (`Msg msg) -> | Error (`Msg msg) ->
Logs.debug (fun m -> m "error while processing command: %s" msg) ; Logs.err (fun m -> m "error while processing command: %s" msg) ;
(t, [ `Data (header, `Failure msg) ], `End) (t, [ `Data (header, `Failure msg) ], `End)
in in
let reply x = `Data (header, `Success x) in let reply x = `Data (header, `Success x) in