Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwrap mlflow 401/403 errors #3688

Closed
wants to merge 1 commit into from
Closed

Conversation

mattyding
Copy link
Contributor

What does this PR do?

Mlflow wraps any object store 401/403 as a 500 InternalException which is bad for error handling. We can unwrap by checking the associated message.

What issue(s) does this change relate to?

Before submitting

  • Have you read the contributor guidelines?
  • Is this change a documentation change or typo fix? If so, skip the rest of this checklist.
  • Was this change discussed/approved in a GitHub issue first? It is much more likely to be merged if so.
  • Did you update any related docs and document your change?
  • Did you update any related tests and add any new tests related to your change? (see testing)
  • Did you run the tests locally to make sure they pass?
  • Did you run pre-commit on your change? (see the pre-commit section of prerequisites)

if isinstance(e, MlflowException):
error_code = e.error_code # pyright: ignore
if error_code == ErrorCode.Name(INTERNAL_ERROR):
if any(e.message.startswith(code) for code in non_retryable_internal_error_codes):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these error messages always start with 401??

Copy link
Contributor Author

@mattyding mattyding Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there are any example of 401 private link errors. I was just including it because there was a comment at some point about wrapping both 401 and 403 errors

@mattyding mattyding closed this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants