From 4aee9bde0e402800be13668b526bd354ef2d1e54 Mon Sep 17 00:00:00 2001 From: Robert Simpson Date: Sun, 10 Sep 2023 05:57:34 +0000 Subject: [PATCH] fix: KeyError Signed-off-by: Robert Simpson --- aries_cloudagent/messaging/valid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/messaging/valid.py b/aries_cloudagent/messaging/valid.py index 73e66af0d0..e2e47eb6cf 100644 --- a/aries_cloudagent/messaging/valid.py +++ b/aries_cloudagent/messaging/valid.py @@ -750,10 +750,10 @@ def __call__(self, value): if "id" in subject: uri_validator = Uri() try: - uri_validator(value["id"]) + uri_validator(subject["id"]) except ValidationError: raise ValidationError( - f"credential subject id {value[0]} must be URI" + f'credential subject id {subject["id"]} must be URI' ) from None return value