bug(lib): fix get dumps bad error code

This commit is contained in:
Marin Postma 2021-12-15 10:30:00 +01:00
parent 5af51c852c
commit 7ddab7ef31
3 changed files with 28 additions and 4 deletions

View file

@ -59,10 +59,7 @@ impl ErrorCode for IndexControllerError {
IndexControllerError::DocumentFormatError(e) => e.error_code(),
IndexControllerError::MissingPayload(_) => Code::MissingPayload,
IndexControllerError::PayloadTooLarge => Code::PayloadTooLarge,
IndexControllerError::DumpError(DumpActorError::DumpAlreadyRunning) => {
Code::DumpAlreadyInProgress
}
IndexControllerError::DumpError(_) => Code::DumpProcessFailed,
IndexControllerError::DumpError(e) => e.error_code(),
}
}
}