yuqi1129 opened a new issue, #13482: URL: https://github.com/apache/gravitino/issues/13482
### Version main branch ### Describe what's wrong When the server returns HTTP 401 with REST error code `1011`, the Python client does not raise its existing `UnauthorizedException`. Table, view, partition, and statistics handlers convert the code to `ErrorConstants` first, causing `ValueError: 1011 is not a valid ErrorConstants`. Other REST handlers fall back to `RESTException`. ### Error message and/or stacktrace `ValueError: 1011 is not a valid ErrorConstants` ### How to reproduce Pass an `ErrorResponse` with code `1011`, type `UnauthorizedException`, and message `Unauthorized` to `TABLE_ERROR_HANDLER`, `VIEW_ERROR_HANDLER`, or `PARTITION_ERROR_HANDLER`. Each raises `ValueError`. The server produces this response when authentication fails. ### Additional context Map `1011` to the existing Python `UnauthorizedException`. Ensure specialized handlers pass unrecognized codes to the common handler instead of raising during enum conversion. Add tests for `1011` and an unknown future code across the affected handlers. PR #13474 fixes the enum conversion in the statistics handler only. -- 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]
