Handle bad json.
This commit is contained in:
@ -23,6 +23,7 @@ pub enum ActionType {
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum ErrorType {
|
||||
DocumentAlreadyExists,
|
||||
DocumentInvalidRequest,
|
||||
DocumentNotFound,
|
||||
}
|
||||
|
||||
@ -75,7 +76,7 @@ mod mtt_replies {
|
||||
let reply = MTTReply::new(msg);
|
||||
match reply.get_error() {
|
||||
Some(err) => match err {
|
||||
ErrorType::DocumentNotFound => {},
|
||||
ErrorType::DocumentNotFound => {}
|
||||
_ => unreachable!("got {:?}: should have been document not found", err),
|
||||
},
|
||||
None => unreachable!("should return an error type"),
|
||||
|
Reference in New Issue
Block a user