onRequestException property
A callback triggered when a request throws an exception during execution.
SocketExceptions (errors thrown due to missing connectivity) will also be forwarded to this callback.
Implementation
void Function(http.Request request, Object error)? onRequestException;