From 0abd4a1db629642cf3468b45b2c69cec8926fa20 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 25 Mar 2022 23:50:26 +0800 Subject: [PATCH] add a response code for dictionary not found --- services/pddb/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/services/pddb/src/lib.rs b/services/pddb/src/lib.rs index 1ef098e70..983d31ef4 100644 --- a/services/pddb/src/lib.rs +++ b/services/pddb/src/lib.rs @@ -444,6 +444,7 @@ impl Pddb { let response = buf.to_original::().unwrap(); let count = match response.code { PddbRequestCode::NoErr => response.index, + PddbRequestCode::NotFound => return Err(Error::new(ErrorKind::NotFound, "dictionary not found")), _ => return Err(Error::new(ErrorKind::Other, "Internal error")), }; // very non-optimal, slow way of doing this, but let's just get it working first and optimize later.