let call_query t ~target query =
match t with
| `Standalone s ->
let open Standalone in
Ketrew_plugin.call_query ~target query
| `Http_client c ->
Http_client.call_query c ~target query
>>< begin function
| `Ok s -> return s
| `Error (`Failure e) -> fail (Log.s e)
| `Error (`Client e) -> fail (Error.log e)
end