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 #82 -- Handle bad request errors and feed them back to the user #96

Conversation

herrbenesch
Copy link
Contributor

@herrbenesch herrbenesch commented May 2, 2024

image

How to test

  • Setup alpha sam
  1. Upload a png file in a private chat
  2. Upload a pdf file in a private chat and add no message

Open question

  • Does currently not work within a group chat. Even if sam is addressed directly. I'm not sure we need this. And if we need it, I'm not sure how to address it.

Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.89%. Comparing base (5474974) to head (0457893).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
+ Coverage   95.83%   95.89%   +0.06%     
==========================================
  Files          19       19              
  Lines         600      609       +9     
==========================================
+ Hits          575      584       +9     
  Misses         25       25              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@herrbenesch herrbenesch force-pushed the 82-badrequesterror-error-code-400-error-message-files-with-extensions-png-are-not-supported-for-retri branch from 7869440 to a3d9a22 Compare May 3, 2024 11:00
@herrbenesch herrbenesch marked this pull request as ready for review May 3, 2024 11:16
@herrbenesch herrbenesch changed the title Handle bad request errors and feed them back to the user Fix #82 -- Handle bad request errors and feed them back to the user May 3, 2024
@herrbenesch herrbenesch requested a review from amureki May 3, 2024 11:19
sam/bot.py Outdated Show resolved Hide resolved
sam/slack.py Outdated Show resolved Hide resolved
@codingjoe codingjoe removed the request for review from amureki May 5, 2024 14:06
@herrbenesch
Copy link
Contributor Author

@codingjoe thanks for the review. I'm now feeding back the error messages to the assistant in order to receive a nicely formatted issue description.

@herrbenesch herrbenesch requested a review from codingjoe May 6, 2024 12:04
Copy link
Member

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the comments. Interesting approach to use the not to translate the error into a human readable Output.
Let's give it a try

@herrbenesch
Copy link
Contributor Author

thanks @codingjoe

@herrbenesch herrbenesch merged commit d3f8025 into main May 7, 2024
7 checks passed
@herrbenesch herrbenesch deleted the 82-badrequesterror-error-code-400-error-message-files-with-extensions-png-are-not-supported-for-retri branch May 7, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants