title: Retrofit returns error 401, NullPointerException for android 4.4.2
body: <p>my code</p>
  
  <pre><code> private void autenticar(TipoLogin tipoLogin, Cidadao cidadao) throws Throwable {
      // Captura o tipo de opção de login
      final Integer opcao = tipoLogin.getCodigo();
  
      this.apiAcessoDAO = FabricaDAO.criarApiAcessoDAO(this.context);
  
  
      Prefeitura prefeitura = null;
      PrefeituraDAO prefeituraDAO = null;
  
      try {
          prefeituraDAO = FabricaDAO.criarPrefeituraDAO(context);
          prefeitura = prefeituraDAO.carregar();
      } catch (SQLException e) {
          e.printStackTrace();
      }
  
      Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
  
      // Crio um restadapter
      RestAdapter restAdapter = new RestAdapter.Builder()
              .setServer(prefeitura.getUrlBase())
              .setErrorHandler(new ExceptionNetwork(this.context))
              .setClient(new OkClient())
              .setConverter(new GsonConverter(gson))
              .build();
  
      CidadaoAPI cidadaoAPI = restAdapter.create(CidadaoAPI.class);
  
      ApiAcesso apiAcesso = null;
  
      // opção selecionada pelo usuário (tipo login)
      switch (opcao)
      {
          case 1:
              apiAcesso = cidadaoAPI.autenticar(cidadao.getSenhaPortal(), tipoLogin.getUrl(), cidadao.getFoneCelular1());
              break;
          case 2:
              apiAcesso = cidadaoAPI.autenticar(cidadao.getSenhaPortal(), tipoLogin.getUrl(), cidadao.getEmail());
              break;
          case 3:
              apiAcesso = cidadaoAPI.autenticar(cidadao.getSenhaPortal(), tipoLogin.getUrl(), cidadao.getCpf());
              break;
          case 4:
              apiAcesso = cidadaoAPI.autenticar(cidadao.getSenhaPortal(), tipoLogin.getUrl(), cidadao.getNumeroCartaoSus());
              break;
          case 5:
              apiAcesso = cidadaoAPI.autenticar(cidadao.getSenhaPortal(), tipoLogin.getUrl(), cidadao.getRegistroCidadao());
              break;
      }
  
      // Insere no banco de dados
      try {
          this.apiAcessoDAO.deletar();
          this.apiAcessoDAO.inserir(apiAcesso);
      } catch (SQLException e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>my error handle</p>
  
  <pre><code>public class ExceptionNetwork implements ErrorHandler {
  
  private Context context;
  
  public ExceptionNetwork(Context context) {
      this.context = context;
  }
  
  /**
   * Return a custom exception to be thrown for a {@link retrofit.RetrofitError}. It is recommended that you
   * pass the supplied error as the cause to any new exceptions.
   * &lt;p/&gt;
   * If the return exception is checked it must be declared to be thrown on the interface method.
   * &lt;p/&gt;
   * Example usage:
   * &lt;pre&gt;
   * class MyErrorHandler implements ErrorHandler {
   *   &amp;#64;Override public Throwable handleError(RetrofitError cause) {
   *     Response r = cause.getResponse();
   *     if (r != null &amp;amp;&amp;amp; r.getStatus() == 401) {
   *       return new UnauthorizedException(cause);
   *     }
   *     return cause;
   *   }
   * }
   * &lt;/pre&gt;
   *
   * @param cause the original {@link retrofit.RetrofitError} exception
   * @return Throwable an exception which will be thrown from a synchronous interface method or
   * passed to an asynchronous error callback. Must not be {@code null}.
   */
  @Override
  public Throwable handleError(RetrofitError cause) {
  
      Response response = cause.getResponse();
  
      if(response.getStatus() == 401) {
          try {
              return new Exception(this.context.getString(R.string.internete_nao_autorizado));
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
      else
      if(response != null &amp;&amp; response.getStatus() == 404) {
          try {
              return new Exception(this.context.getString(R.string.internete_nao_encontrado));
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
      else
      if(response != null &amp;&amp; response.getStatus() == 307)
      {
          try
          {
              return new Exception(this.context.getString(R.string.internete_link_redirecionado));
          } catch (Exception e)
          {
              e.printStackTrace();
          }
      }
      else
      if(response == null)
      {
          try {
              return new Exception(this.context.getString(R.string.internete_link_offiline));
          } catch (Exception e)
          {
              e.printStackTrace();
          }
      }
  
      return new Exception(this.context.getString(R.string.internete_link_offiline));
  }
  </code></pre>
  
  <p>}</p>
  
  <p>error</p>
  
  <pre><code>05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ java.lang.NullPointerException
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at br.com.appsap.app.exeption.ExceptionNetwork.handleError(ExceptionNetwork.java:52)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:286)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at $Proxy2.autenticar(Native Method)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at br.com.appsap.app.controller.implementacao.CidadaoControllerImplementacao.autenticar(CidadaoControllerImplementacao.java:176)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at br.com.appsap.app.controller.implementacao.CidadaoControllerImplementacao.login(CidadaoControllerImplementacao.java:129)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at br.com.appsap.app.view.LoginActivity$PlaceholderFragment.onClick(LoginActivity.java:320)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at android.view.View.performClick(View.java:4438)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at android.view.View$PerformClick.run(View.java:18422)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at android.os.Handler.handleCallback(Handler.java:733)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:95)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at android.os.Looper.loop(Looper.java:136)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5017)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
  05-20 13:27:21.968    1243-1243/br.com.appsap.app W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
  </code></pre>