diff options
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | src/uid.rs | 6 |
2 files changed, 6 insertions, 4 deletions
@@ -1,4 +1,6 @@ Need to make a proper http status code thingy Token Values Token Stock Prices (Values) -Config
\ No newline at end of file +Config +Change passwords +Trade Requests
\ No newline at end of file @@ -20,13 +20,13 @@ impl<'de> Visitor<'de> for UIDVisitor { if v.len() == 4 { match hex::decode(v) { Ok(n) => Ok(UID(n[0], n[1])), - Err(_) => panic!() + Err(_) => Err(serde::de::Error::custom("Could not decode hex")) } } else { - panic!() + Err(serde::de::Error::custom("ID must be a 2 byte hex string \'0000\'-\"FFFF\"")) } } else { - panic!() + Err(serde::de::Error::custom("Invalid characters in string")) } } } |