rpc, eth_filter: return error if the filter id does not exist (#8341)

This commit is contained in:
Wei Tang
2018-04-10 16:36:14 +08:00
committed by Marek Kotewicz
parent 8e7a08f865
commit d1487b3177
2 changed files with 12 additions and 3 deletions

View File

@@ -399,6 +399,14 @@ pub fn deprecated<T: Into<Option<String>>>(message: T) -> Error {
}
}
pub fn filter_not_found() -> Error {
Error {
code: ErrorCode::ServerError(codes::UNSUPPORTED_REQUEST),
message: "Filter not found".into(),
data: None,
}
}
// on-demand sender cancelled.
pub fn on_demand_cancel(_cancel: futures::sync::oneshot::Canceled) -> Error {
internal("on-demand sender cancelled", "")