onError method
Called when an exception was occurred during the request.
Implementation
@override
void onError(DioError err, ErrorInterceptorHandler handler) {
_renderCurlRepresentation(err.requestOptions);
return handler.next(err); //continue
}