kevinjqliu commented on PR #1517:
URL: https://github.com/apache/iceberg-python/pull/1517#issuecomment-2593673519

   Hey @MChamberlin Thanks for the PR. 
   
   I have some concerns related to this approach
   
   > Some REST catalog implementations (including the Snowflake Polaris 
catalog) return a 401 when a token is expired, raising an UnauthorizedError 
within pyiceberg.
   
   401 status is specifically for unauthorized requests 
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
   If we add 401 to the list of retry-able errors, we'd have to retry for other 
"truly" unauthorized errors which does not feel like the right thing to do.
   
   My suggestion would be to change the catalog implementation to send 419 
instead. The [REST 
spec](https://editor-next.swagger.io/?url=https://raw.githubusercontent.com/apache/iceberg/main/open-api/rest-catalog-open-api.yaml)
 specifically calls out 401 as UnauthorizedResponse and 419 as 
AuthenticationTimeoutResponse 


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to