noidname01 commented on code in PR #4093:
URL: https://github.com/apache/gravitino/pull/4093#discussion_r1667945809


##########
clients/client-python/gravitino/dto/responses/base_response.py:
##########
@@ -35,7 +35,6 @@ def code(self) -> int:
 
     def validate(self):
         """Validates the response code.
-        TODO: @throws IllegalArgumentException if code value is negative.
+        @throws IllegalArgumentException if code value is negative.
         """
-        if self._code < 0:
-            raise ValueError("code must be >= 0")
+        assert self._code >= 0, "code must be >= 0"

Review Comment:
   No, because `assert` can only throw `AssertError`, it can't throw custom 
exceptions. I think I will create another issue to fix all `assert` problem, 
otherwise this PR will include too many changes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to