mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 17:39:49 +00:00
Handle HTTP status '401 UNAUTHORIZED'.
This commit is contained in:
parent
27894dbf78
commit
5e47d29312
1 changed files with 3 additions and 2 deletions
|
@ -183,8 +183,9 @@ public final class ParserUtils
|
|||
|
||||
return is;
|
||||
}
|
||||
else if (responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_BAD_REQUEST
|
||||
|| responseCode == HttpURLConnection.HTTP_NOT_ACCEPTABLE || responseCode == HttpURLConnection.HTTP_UNAVAILABLE)
|
||||
else if (responseCode == HttpURLConnection.HTTP_BAD_REQUEST || responseCode == HttpURLConnection.HTTP_UNAUTHORIZED
|
||||
|| responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_NOT_ACCEPTABLE
|
||||
|| responseCode == HttpURLConnection.HTTP_UNAVAILABLE)
|
||||
{
|
||||
throw new BlockedException(url);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue