297: Use ContentModified error code r=matklad a=matklad

25679c2e4b

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2018-12-20 09:23:27 +00:00
commit d8c6b8d999
2 changed files with 2 additions and 1 deletions

View file

@ -55,6 +55,7 @@ pub enum ErrorCode {
ServerNotInitialized = -32002, ServerNotInitialized = -32002,
UnknownErrorCode = -32001, UnknownErrorCode = -32001,
RequestCancelled = -32800, RequestCancelled = -32800,
ContentModified = -32801,
} }
#[derive(Debug, Serialize, Deserialize, Clone)] #[derive(Debug, Serialize, Deserialize, Clone)]

View file

@ -386,7 +386,7 @@ impl<'a> PoolDispatcher<'a> {
if is_canceled(&e) { if is_canceled(&e) {
RawResponse::err( RawResponse::err(
id, id,
ErrorCode::RequestCancelled as i32, ErrorCode::ContentModified as i32,
e.to_string(), e.to_string(),
) )
} else { } else {