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

Add a user friendly error message for http exceptions #3581

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

grandbora
Copy link
Contributor

What this PR does / why we need it:
Adds a user friendly error message to http exceptions that may happen when sending requests to the predictor node.

Example error log:

2024-12-12 12:12:12.333 37708 kserve ERROR [_http_predict():279] Could not send a request to predictor at url https://predictor/generate with headers {'Content-Type': 'application/json', 'x-request-id': 'xxxxx'} and with data b'{"inputs":"generate prompt text.","parameters":{"max_new_tokens":128,"temperature":0.9,"top_p":0.9,"top_k":50,"seed":12345,"details":true,"do_sample":true}}' due to exception [Errno 8] nodename nor servname provided, or not known

Type of changes
Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Feature/Issue validation/testing:
Tested locally. Spun up a transformer and pointed it to a wrong url. Generated the log message above.

Special notes for your reviewer:
No image changes.

Checklist:

  • Have you added unit/e2e tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

Release note:

Not worth of a release note.

@grandbora grandbora marked this pull request as ready for review April 8, 2024 16:52
@oss-prow-bot oss-prow-bot bot requested a review from andyi2it April 8, 2024 16:52
@grandbora grandbora force-pushed the exhandle branch 2 times, most recently from abc7a43 to 0b1f95f Compare April 8, 2024 16:55
@grandbora
Copy link
Contributor Author

cc @yuzisun @cmaddalozzo

Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

See comment

@terrytangyuan
Copy link
Member

/hold

@grandbora
Copy link
Contributor Author

@terrytangyuan removed logging for potentially sensitive data.

Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

/lgtm

@terrytangyuan
Copy link
Member

Can you sign DCO?

@grandbora
Copy link
Contributor Author

Yes, signing the DCO in a minute.

Copy link
Contributor

@spolti spolti left a comment

Choose a reason for hiding this comment

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

Nice addition, thanks!

Signed-off-by: grandbora <grandbora@fb.com>
@grandbora
Copy link
Contributor Author

@terrytangyuan signed the DCO. Thank you.

@terrytangyuan
Copy link
Member

/lgtm

@oss-prow-bot oss-prow-bot bot added the lgtm label Apr 10, 2024
@grandbora
Copy link
Contributor Author

/assign @jinchihe

@grandbora
Copy link
Contributor Author

@jinchihe would you mind approving this pr?

@grandbora
Copy link
Contributor Author

@jinchihe @terrytangyuan @yuzisun is there anything else needs to be done for this pr?

@grandbora
Copy link
Contributor Author

/unhold

@grandbora
Copy link
Contributor Author

/assign @yuzisun

@grandbora
Copy link
Contributor Author

/unassign @terrytangyuan

@grandbora
Copy link
Contributor Author

/meow

Copy link

oss-prow-bot bot commented Apr 17, 2024

@grandbora: cat image

In response to this:

/meow

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 kubernetes/test-infra repository.

@grandbora
Copy link
Contributor Author

@yuzisun @jinchihe I'd appreciate 👀 on this.

@terrytangyuan
Copy link
Member

@grandbora You'll have to be a little more patient since the only active approver is @yuzisun right now.

@yuzisun
Copy link
Member

yuzisun commented Apr 19, 2024

/lgtm
/approve

Copy link

oss-prow-bot bot commented Apr 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grandbora, spolti, terrytangyuan, yuzisun

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

The pull request process is described 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

@yuzisun yuzisun merged commit 09a9168 into kserve:master Apr 20, 2024
56 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.

None yet

5 participants