src/server/rest.rs: improve error handling
This commit is contained in:
parent
907f5bb0d8
commit
1179e15842
@ -258,6 +258,9 @@ pub fn handle_sync_api_request<Env: RpcEnvironment>(
|
|||||||
} else {
|
} else {
|
||||||
Either::B(future::ok(resp))
|
Either::B(future::ok(resp))
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.or_else(move |err| {
|
||||||
|
Ok((formatter.format_error)(err))
|
||||||
});
|
});
|
||||||
|
|
||||||
Box::new(resp)
|
Box::new(resp)
|
||||||
|
Loading…
Reference in New Issue
Block a user