Repository navigation
Conversation
|
@SevInf Your thoughts here would be very much appreciated! 😀 |
|
Thank you @AikoRamalho, overall looks good, left one small comment. |
modelName to handleAndLogRequestError params
Working on it! |
2140e3d to
d619e4c
Compare
|
Hey @SevInf ! I created some tests for unique constraint validation errors. However, I haven't tested all possible error codes for PrismaClientKnownError. Let me know your thoughts on the matter, and please inform me if it's necessary to include any tests—I'll implement them here. Thanks for your cooperation! I'm loving contributing to the project! |
f11e9cc to
804f774
Compare
|
Hey @janpio! Your thoughts here would be very much appreciated! thank you!!! |
804f774 to
00640de
Compare
00640de to
9b5b64e
Compare
SevInf
left a comment
There was a problem hiding this comment.
@AikoRamalho looks good, thank you and congratulations on the first contribution.
Closes #20724
This PR enhances error handling in the codebase by including the modelName parameter in the error handling process. This modification ensures better contextual information is available when handling and logging errors during a request.
Changes
Added modelName to the parameters passed in the catch block of the try-catch statement.
Updated the HandleErrorParams interface and modified the handleRequestError method to include the modelName parameter.
Motivation
When an error occurs during a request, having the modelName information at hand can significantly improve the debugging and error resolution process. This update provides more comprehensive details about the context in which an error occurred, enhancing the overall maintainability and troubleshooting capabilities of the code.