title: Retrofit 2.0 Convertor returns NULL
body: <p>I use <strong>Retrofit 2.0.0-beta2</strong>.</p>
  
  <p>I found an <a href="https://github.com/square/retrofit/blob/5d249a397a571421dc1fd8573f9f80bf2ee3a81d/samples/src/main/java/com/example/retrofit/DeserializeErrorBody.java" rel="nofollow">example</a> of a <strong>synchronous</strong> conversion <strong>.errorBody</strong> to object.</p>
  
  <p>I need to implement it asynchronously.</p>
  
  <p>It's my json:</p>
  
  <pre><code>{
    "error_msg": "This user name is already registered."
  }
  </code></pre>
  
  <p>When run the <strong>asynchronous</strong> example, I get <strong><em>null</em></strong>.</p>
  
  <pre><code>package com.test.client;
  
  import com.squareup.okhttp.ResponseBody;
  
  import java.io.IOException;
  import java.lang.annotation.Annotation;
  
  import retrofit.Call;
  import retrofit.Callback;
  import retrofit.Converter;
  import retrofit.GsonConverterFactory;
  import retrofit.Response;
  import retrofit.Retrofit;
  import retrofit.http.GET;
  
  public final class DeserializeErrorBody {
  
  interface Service {
      @GET("account.signup")
      Call&lt;User&gt; getUser();
  }
  
  static class User {
      // normal fields...
  }
  
  static class Error {
      String error_msg;
  }
  
  public static void main(String... args) throws IOException {
      Retrofit retrofit = new Retrofit.Builder()
              .baseUrl("https://api.site.com/method/")
              .addConverterFactory(GsonConverterFactory.create())
              .build();
  
      Service service = retrofit.create(Service.class);
  
  
      // ASYNCHRONOUS
  
      Call&lt;User&gt; response = service.getUser();
      response.enqueue(new Callback&lt;User&gt;() {
  
          @Override
          public void onResponse(Response&lt;User&gt; response, Retrofit retrofit) {
              if(!responce.isSuccess()) {
  
                  System.out.println(response.errorBody().string()); // returns { "error_msg": "This user name is already registered."}    :)))))
  
                  Converter&lt;ResponseBody, Error&gt; errorConverter = retrofit.responseConverter(Error.class, new Annotation[0]);
  
                  try {
                      Error error = errorConverter.convert(response.errorBody());
  
                      System.out.println(error); // returns null   :((((((
  
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
          }
  
          @Override
          public void onFailure(Throwable t) {
              // ...
          }
      });
  
  
      // SYNCHRONOUS
  
      /*
      Response&lt;User&gt; call = service.getUser().execute();
      Converter&lt;ResponseBody, Error&gt; errorConverter = retrofit.responseConverter(Error.class, new Annotation[0]);
  
      Error error = errorConverter.convert(call.errorBody());
      System.out.println(error); // returns Object     :))))))
      System.out.println(error.error_msg); // returns "This user name is already registered."    :))))))
      */
  
  }
  }
  </code></pre>
  
  <p>Sorry for my bad English :)</p>
  
  <p>In asynchronous request <strong>successfully returns a string</strong>. However, conversion to the <strong>object</strong> is <strong>not</strong> running.</p>
  
  <p>How to get the <strong>object</strong> instead of <strong><em>null</em></strong>? </p>