decodeErrorFromMap property

E Function(int statusCode, Map<String, dynamic> data)? decodeErrorFromMap
final

A function to decode an error body received from an API call can be eventually provided. The E type must extend Decodable.

The method has two input arguments to retrieve information about http status code and data as map. It must be passed as tear-off to the ConnectionManager constructor. Note that this function can be overriden for each api request, if needed.

Implementation

final E Function(int statusCode, Map<String, dynamic> data)?
    decodeErrorFromMap;