mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 01:19:49 +00:00
HttpClient: Handle HTTP status '502 Bad Gateway'.
This commit is contained in:
parent
4affd18885
commit
6e58ba6ebb
1 changed files with 2 additions and 1 deletions
|
@ -240,7 +240,8 @@ public final class HttpClient {
|
|||
} else if (responseCode == HttpURLConnection.HTTP_MOVED_PERM
|
||||
|| responseCode == HttpURLConnection.HTTP_MOVED_TEMP) {
|
||||
throw new UnexpectedRedirectException(url, HttpUrl.parse(response.header("Location")));
|
||||
} else if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
|
||||
} else if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR
|
||||
|| responseCode == HttpURLConnection.HTTP_BAD_GATEWAY) {
|
||||
throw new InternalErrorException(url, bodyPeek);
|
||||
} else {
|
||||
final String message = "got response: " + responseCode + " " + response.message();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue