Human-readable gpodder error message
This commit is contained in:
parent
345aad4148
commit
f6fc2c6d73
|
@ -101,7 +101,7 @@ public abstract class PodcastListFragment extends Fragment {
|
|||
}, error -> {
|
||||
gridView.setVisibility(View.GONE);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
txtvError.setText(getString(R.string.error_msg_prefix) + error.getMessage());
|
||||
txtvError.setText(error.getMessage());
|
||||
txtvError.setVisibility(View.VISIBLE);
|
||||
butRetry.setVisibility(View.VISIBLE);
|
||||
Log.e(TAG, Log.getStackTraceString(error));
|
||||
|
|
|
@ -588,7 +588,13 @@ public class GpodnetService implements ISyncService {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
throw new GpodnetServiceBadStatusCodeException("Bad response code: " + responseCode, responseCode);
|
||||
if (responseCode >= 500) {
|
||||
throw new GpodnetServiceBadStatusCodeException("Gpodder.net is currently unavailable (code "
|
||||
+ responseCode + ")", responseCode);
|
||||
} else {
|
||||
throw new GpodnetServiceBadStatusCodeException("Unable to connect to Gpodder.net (code "
|
||||
+ responseCode + ": " + response.message() + ")", responseCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue