-
-
Notifications
You must be signed in to change notification settings - Fork 45
[OpenAi][ResultConverter] Enhance the exception message if possible #199
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
Conversation
Yea, the error handling is not great across the entire layer - what do you think about #167? |
I think it's better. But, IMHO, it's not enough. Some important information from the raw response (see this PR description) are hidden. They must be shown to the end user to be able to debug easily. |
True, we should have as much helpful information as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's bring this in 👍
I have rebased my PR in ordre to fix conflict. Allow me to dump everything I have in mind... I think another solution would be to check the status code of the response, directly after making the request: ai/src/platform/src/Bridge/OpenAi/Embeddings/ModelClient.php Lines 42 to 48 in 59f1422
But I guess this would break the laziness. This is why you didn't do it. So it's a nogo, right? So my patch should be applied everywhere results are consumed? It's a bit boring, but doable. Since I dislike boring tasks (who doesn't 😅), another solution could be do add a wrapper (decorator) around the result to do the check for us automatically. Side Note: I didn't know the project quite well yet, And I'm not aware of all the choices you made. But ATM I fail to see the benefits of some decoupling. There are some indirection that are a bit hard to "decode". If you agree, I would like to question a bit your architecture decisions. (I could open a new issue if you prefer, and copy/paste everything there)
|
Hey @lyrixx - thanks for that, got little feedback on architecture yet and I'm really happy to discuss more of the architecture and challenge what we have here :) Let me share a bit of reasoning and challenge that I faced - at least two things: 1 2 I somewhere have one refactoring branch that tried a but yeah, feels like we should move that to an issue :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge, but let's move other discussions to issues :)
Thank you @lyrixx. |
Before:
After