From 1409618b954a53ae4832a1212f18f957c1a7775c Mon Sep 17 00:00:00 2001 From: Justin Hipple Date: Wed, 11 Mar 2020 16:30:42 -0500 Subject: [PATCH] Fix a misleading error message AWSEvents.DescribeRule throws an error that references a rule named "test" rather than the specified rule name when a rule with the specified name does not exist. It has been fixed to reference the specified rule name. --- moto/events/responses.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moto/events/responses.py b/moto/events/responses.py index 68c2114a6..c9931aabc 100644 --- a/moto/events/responses.py +++ b/moto/events/responses.py @@ -62,7 +62,9 @@ class EventsHandler(BaseResponse): rule = self.events_backend.describe_rule(name) if not rule: - return self.error("ResourceNotFoundException", "Rule test does not exist.") + return self.error( + "ResourceNotFoundException", "Rule " + name + " does not exist." + ) rule_dict = self._generate_rule_dict(rule) return json.dumps(rule_dict), self.response_headers