It checks if the onResponseParse callback in the parameters object is null.
If onResponseParse is null, it resolves the response using handler.resolve(response).
if onResponseParse is not null, it calls the onResponseParse callback with the response and then resolves the response using handler.resolve(parameters.onResponseParse!(response)).
Null check fix on
NetworkManagerErrorInterceptor
What is the current behavior?
The code calls the onResponseParse callback function from the parameters object without null check.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
What is the expected behavior?
onResponseParse
callback in the parameters object is null.onResponseParse
isnull
, it resolves the response usinghandler.resolve(response)
.onResponseParse
isnot null
, it calls theonResponseParse
callback with theresponse
and then resolves the response usinghandler.resolve(parameters.onResponseParse!(response))
.