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
Currently, when we try to parse a remote error, and its not a valid JSON payload, (such as some undefined errors and path errors) we return an error that is not a RemoteError, which also means that the specifics (status code & plain-text message) gets lost as well.
One solution
Add the ability to RemoteError to note what was the plain-text response in case the unmarshalling fails, such as a Plain []byte field noting the contents, an ID made on the fly, and correct RemoteError.Error handling.
The text was updated successfully, but these errors were encountered:
The problem
Currently, when we try to parse a remote error, and its not a valid JSON payload, (such as some
undefined
errors and path errors) we return an error that is not a RemoteError, which also means that the specifics (status code & plain-text message) gets lost as well.One solution
Add the ability to RemoteError to note what was the plain-text response in case the unmarshalling fails, such as a
Plain []byte
field noting the contents, an ID made on the fly, and correctRemoteError.Error
handling.The text was updated successfully, but these errors were encountered: