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