diff --git a/src/keri/vdr/viring.py b/src/keri/vdr/viring.py index 434a2d16..cf2ed805 100644 --- a/src/keri/vdr/viring.py +++ b/src/keri/vdr/viring.py @@ -485,6 +485,8 @@ def cloneCred(self, said): """ creder = self.creds.get(keys=(said,)) + if creder is None: + raise kering.MissingEntryError(f"no credential found with said {said}") prefixer, seqner, saider = self.cancs.get(keys=(said,)) return creder, prefixer, seqner, saider diff --git a/tests/vdr/test_verifying.py b/tests/vdr/test_verifying.py index ea7bb1bc..6cd16154 100644 --- a/tests/vdr/test_verifying.py +++ b/tests/vdr/test_verifying.py @@ -115,6 +115,9 @@ def test_verifier(seeder): for idx, cred in enumerate(creds): assert dcre.sad == cred["sad"] + with pytest.raises(kering.MissingEntryError): + regery.reger.cloneCred(said="nonexistantsaid") + """End Test"""