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

Python generic exception handling #3473

Merged
merged 3 commits into from
Aug 10, 2021

Conversation

mwm5945
Copy link
Contributor

@mwm5945 mwm5945 commented Aug 6, 2021

What this PR does / why we need it:
This fixes how exceptions are handled by the REST Python server. Previously, any unhandle-ed exceptions would result in a very generic Flask error, which is not parse-able into a seldon message. This adds a generic exception handler that returns a 500 error in a Seldon message. Custom error handlers inside the user object still function correctly.

Which issue(s) this PR fixes:

Fixes #2338

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Python microservice generic exception handling

@seldondev
Copy link
Collaborator

Hi @mwm5945. Thanks for your PR.

I'm waiting for a SeldonIO or todo member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign ivan-valkov
You can assign the PR to them by writing /assign @ivan-valkov in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mwm5945
Copy link
Contributor Author

mwm5945 commented Aug 6, 2021

/assign @ivan-valkov

@mwm5945
Copy link
Contributor Author

mwm5945 commented Aug 9, 2021

cc: @axsaucedo

@ukclivecox
Copy link
Contributor

/ok-to-test

@ukclivecox
Copy link
Contributor

/test integration

@axsaucedo axsaucedo merged commit eb06ffa into SeldonIO:master Aug 10, 2021
@mwm5945 mwm5945 deleted the python-generic-exception-handling branch August 10, 2021 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python Wrapper should Handle Exceptions correctly
5 participants