diff --git a/src/collective/feedback/restapi/services/update.py b/src/collective/feedback/restapi/services/update.py index 001a07b..5ba26f1 100644 --- a/src/collective/feedback/restapi/services/update.py +++ b/src/collective/feedback/restapi/services/update.py @@ -30,7 +30,10 @@ def reply(self): tool = getUtility(ICollectiveFeedbackStore) if self.params: - id = self.params[0] + try: + id = int(self.params[0]) + except ValueError: + raise BadRequest(f"Bad id={self.params[0]} format provided") comment = tool.get(id)