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

fix: Added Online Store REST client errors handler #4488

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

tmihalac
Copy link
Contributor

@tmihalac tmihalac commented Sep 4, 2024

What this PR does / why we need it:

Added a decorator for rest calls to remote online server failures and adds an additional message to the response with the failure status and details.
The proxy client then rebuilds the original error from the status data.

Which issue(s) this PR fixes:

Fixes #4481

@tmihalac tmihalac changed the title fix:Added Online Store REST client errors handler fix: Added Online Store REST client errors handler Sep 4, 2024
utils.make_tzaware(parser.parse(request.end_ts)), request.feature_views
)

@app.exception_handler(Exception)

Choose a reason for hiding this comment

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

Very nice, I didn't realize FastAPI had a global exception handler.

https://fastapi.tiangolo.com/tutorial/handling-errors/#install-custom-exception-handlers

Copy link
Contributor

@dmartinol dmartinol left a comment

Choose a reason for hiding this comment

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

lgtm apart the comment on errors module

- Small refactor to from_error_detail and FeastErrors
- Fixed tests

Signed-off-by: Theodor Mihalache <[email protected]>
- Fixed linter

Signed-off-by: Theodor Mihalache <[email protected]>
Copy link
Collaborator

@tokoko tokoko left a comment

Choose a reason for hiding this comment

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

lgtm

@tokoko tokoko merged commit 2118719 into feast-dev:master Sep 5, 2024
15 checks passed
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.

Online Store client does not map application errors
5 participants