Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Forbid null for a network response #114

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amuyu
Copy link

@amuyu amuyu commented Oct 19, 2017

In case of network connection failure, VolleyError.networkResponse is null.
If it is null, App crach occurs.

10-19 14:46:36.691 31111-31195/com.morihacky.android.rxjava E/routes: com.android.volley.NoConnectionError: java.net.UnknownHostException: Unable to resolve host "www.weather.com.cn": No address associated with hostname
10-19 14:46:36.700 31111-31111/com.morihacky.android.rxjava E/VolleyDemoFragment: com.android.volley.NoConnectionError: java.net.UnknownHostException: Unable to resolve host "www.weather.com.cn": No address associated with hostname

So, A null validation of the response is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant