title: How to handle network errors in Retrofit 2 with RxJava
body: <p>I am using Retrofit2 with RxJava. So my call looks something like </p>
  
  <pre><code>subscriptions.add(authenticateUser(mReq, refreshRequest)
                  .observeOn(Schedulers.io())
                  .subscribeOn(Schedulers.io())
                  .subscribe(authResponseModel -&gt; {
                      processResponse(authResponseModel, userName, encryptedPass);
                  }, throwable -&gt;
                  {
                      LOGW(TAG, throwable.getMessage());
                  }));
  </code></pre>
  
  <p>It's an authentication api. So when the api call fails, I get a response from the server like</p>
  
  <pre><code>{"messages":["Invalid username or password "]}
  </code></pre>
  
  <p>along with <code>400 Bad Request</code></p>
  
  <p>I get <code>400 Bad Request</code> in the <code>throwable</code> object as expected. But I want to receive the message thrown by the server. I am unable to figure out how to go about doing it.
  Can someone help out.</p>