You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
I found that if the response is not OK, the description of error will not be stored in the ApiResponse.
This makes debug a little harder, and can't send the error message back to user.
Do you plan to add the error description into the ApiResponse?
Or I can send a pull request to fix this if you thought it is necessary.
The text was updated successfully, but these errors were encountered:
I found that if the response is not OK, the description of error will not be stored in the ApiResponse
This makes debug a little harder, and can't send the error message back to user
Do you plan to add the error description into the ApiResponse?
Or I can send a pull request to fix this if you thought it is necessary
—
Reply to this email directly or view it on GitHub.
Hi,
Adding error description info into ApiResponse is easy. But I don't know how to throw the error info out into high level.
The ApiResponse will be transformed into Message. But Message doesn't have any field can store error info.
I don't know whether to add fields into Message to store error info or throw an exception.
Currently if the response is not OK, Message's fields will be nil. So users can't get the details of error info in response.
If add fields of error info into Message, users must check whether Message is OK every time. If users don't check, the behavior of code may not change(just like now).
Or,
handling the exception or not, chosen by themselves, but if not, may interrupt the program.
Install this lib from gem.
I found that if the response is not OK, the description of error will not be stored in the ApiResponse.
This makes debug a little harder, and can't send the error message back to user.
Do you plan to add the error description into the ApiResponse?
Or I can send a pull request to fix this if you thought it is necessary.
The text was updated successfully, but these errors were encountered: