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
Imagine a case where you expect expect a JSON array in the body if the request is successful and a JSON dictionary body in case the server returns a 400 status code.
The error decoder signature now looks like this:
func error(from jsonArray:[Any])->Error?
it would be nice if it were something like:
func error(from json:Any, statusCode:Int)->Error?
or maybe even more generic, providing the raw Data as a parameter.
This issue applies also to the other specialised resource types.
The text was updated successfully, but these errors were encountered:
Imagine a case where you expect expect a JSON array in the body if the request is successful and a JSON dictionary body in case the server returns a 400 status code.
The error decoder signature now looks like this:
it would be nice if it were something like:
or maybe even more generic, providing the raw
Data
as a parameter.This issue applies also to the other specialised resource types.
The text was updated successfully, but these errors were encountered: