handleError method
Implementation
ErrorResponse handleError(var error) {
if(error.runtimeType.toString().toLowerCase() =="_TypeError".toLowerCase()){
// return error.toString();
errorResponse.message ="The Provided API key is invalid";
return errorResponse;
}
else if(error is DioException) {
return DioErrorHandler().handleDioError(error);
}
errorResponse.message = "The Provided API key is invalid";
return errorResponse;
}