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

bug: handle bad image file #2942

Merged
merged 2 commits into from
Aug 26, 2022
Merged

Conversation

parano
Copy link
Member

@parano parano commented Aug 26, 2022

What does this PR address?

Fixing an issue first reported here in the slack community:
https://bentoml.slack.com/archives/CKRANBHPH/p1661185794381889

For input=Image(), if the uploaded file is not an image, the server should return 400 code with an error message on bad input instead of 500 indicating an issue with the user code.

Fixes #(issue)

Before submitting:

Who can help review?

Feel free to tag members/contributors who can help review your PR.

@parano parano requested a review from a team as a code owner August 26, 2022 03:26
@parano parano requested review from ssheng and removed request for a team August 26, 2022 03:26
@codecov
Copy link

codecov bot commented Aug 26, 2022

Codecov Report

Merging #2942 (b00ac1a) into main (0354edb) will decrease coverage by 0.01%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2942      +/-   ##
==========================================
- Coverage   70.56%   70.55%   -0.02%     
==========================================
  Files         104      104              
  Lines        9496     9499       +3     
==========================================
+ Hits         6701     6702       +1     
- Misses       2795     2797       +2     
Impacted Files Coverage Δ
bentoml/_internal/io_descriptors/image.py 83.33% <50.00%> (-2.00%) ⬇️

@aarnphm aarnphm changed the title bug: fix handling bad image file bug: handle bad image file Aug 26, 2022
@aarnphm aarnphm merged commit 0439583 into bentoml:main Aug 26, 2022
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.

None yet

3 participants