Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhawak committed Aug 24, 2020
1 parent 465c4a1 commit 6dc8dce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.baato.baatolibrary.services;

import android.content.Context;
import android.util.Log;
import android.widget.Toast;

import androidx.annotation.NonNull;

Expand Down Expand Up @@ -93,6 +95,7 @@ public void onResponse(Call<PlaceAPIResponse> call, Response<PlaceAPIResponse> r
else {
try {
baatoPlaceListener.onFailed(new Throwable(response.errorBody().string()));
cancelRequest();
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void onResponse(Call<PlaceAPIResponse> call, Response<PlaceAPIResponse> r
else {
try {
baatoReverseRequestListener.onFailed(new Throwable(response.errorBody().string()));
Log.d(TAG, "onResponse: ");
cancelRequest();
} catch (Exception e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public void onResponse(Call<DirectionsAPIResponse> call, Response<DirectionsAPIR
} else {
try {
baatoRoutingRequestListener.onFailed(new Throwable(response.errorBody().string()));
cancelRequest();
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public void onResponse(Call<SearchAPIResponse> call, Response<SearchAPIResponse>
else {
try {
baatoSearchRequestListener.onFailed(new Throwable(response.errorBody().string()));
cancelRequest();
} catch (IOException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 6dc8dce

Please sign in to comment.