summaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-12-02 10:48:14 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-12-17 23:03:08 -0800
commitc29183a78cb13d507b44bc57d392beae89250339 (patch)
tree1656a63df7d997be9e10456e01876eb33bec7fa9 /rust/src
parent5a139a680a40a9628cd4c0116226f7c9ae470572 (diff)
downloadfatcat-c29183a78cb13d507b44bc57d392beae89250339.tar.gz
fatcat-c29183a78cb13d507b44bc57d392beae89250339.zip
rust: fix malformed ext id error type
This bug was due to copy/paste of SHA-1 check
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/identifiers.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/identifiers.rs b/rust/src/identifiers.rs
index 9d766417..9d3734c9 100644
--- a/rust/src/identifiers.rs
+++ b/rust/src/identifiers.rs
@@ -369,7 +369,7 @@ pub fn check_doaj_id(raw: &str) -> Result<()> {
if raw.is_ascii() && RE.is_match(raw) {
Ok(())
} else {
- Err(FatcatError::MalformedChecksum(
+ Err(FatcatError::MalformedExternalId(
"DOAJ Article Identifier (expected, eg, 'e58f08a11ecb495ead55a44ad4f89808')"
.to_string(),
raw.to_string(),
@@ -427,7 +427,7 @@ pub fn check_oai_id(raw: &str) -> Result<()> {
if raw.is_ascii() && RE.is_match(raw) {
Ok(())
} else {
- Err(FatcatError::MalformedChecksum(
+ Err(FatcatError::MalformedExternalId(
"OAI-PMH identifier (expected, eg, 'oai:foo.org:some-local-id-54')".to_string(),
raw.to_string(),
))?