title: Retrofit onFailure not working in login method
body: <p>I'm calling a login method from Laravel using Retrofit , my problem is that when writing right username and password , it opens the other activity and everything's fine, but when writing wrong infos it doesn't open anything but doesn't show the message error either. What is missing?</p>
  
  <p>Laravel code:</p>
  
  <pre><code>    public function login(Request $request) {
  
      $assistant = DB::table('assistants')
          -&gt;where('username', $request-&gt;input('username'))
          -&gt;where('mot_de_passe', $request-&gt;input('mot_de_passe'))
          -&gt;first();
  
  
      if($assistant != null){
  
          return response()-&gt;json ($assistant);
      }else{
          $returnData = array(
              'status' =&gt; 'false',
              'message' =&gt; 'write some message..');
          return response()-&gt;json ($returnData ,500  );
      }}
  </code></pre>
  
  <p>Retrofit:</p>
  
  <pre><code>      IAssistant iAssistant= APIClient.getClient().create(IAssistant.class);
  
  
                iAssistant.login(username.getText().toString(),password.getText().toString()).enqueue(new Callback&lt;Assistant&gt;() {
                  @Override
                  public void onResponse(retrofit2.Call&lt;Assistant&gt; call, Response&lt;Assistant&gt; response) {
  
                  if (response.isSuccessful()){
                          startActivity(new Intent(getApplicationContext(), BottomNavigation.class));
                      Toast.makeText(getApplicationContext(),"assistant"+response.body().getNom(),Toast.LENGTH_LONG).show();
  
                   }}
  
                  @Override
                  public void onFailure(retrofit2.Call&lt;Assistant&gt; call, Throwable t) {
  
                      Toast.makeText(getApplicationContext(),"'error",Toast.LENGTH_LONG).show();
                      Log.v("tag!!!!!!!!!!","error"+t.getMessage());
  
                  }
                  });
  </code></pre>