Fix offline description on failed HTTP call (#12990)

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen 2022-06-22 22:35:11 +02:00 committed by GitHub
parent 565dc19508
commit 8d900dbcf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,7 +216,7 @@ public class IndegoController {
throw new IndegoAuthenticationException("Context rejected"); throw new IndegoAuthenticationException("Context rejected");
} }
if (!HttpStatus.isSuccess(status)) { if (!HttpStatus.isSuccess(status)) {
throw new IndegoAuthenticationException("The request failed with HTTP error: " + status); throw new IndegoException("The request failed with error: " + status);
} }
String jsonResponse = response.getContentAsString(); String jsonResponse = response.getContentAsString();
if (jsonResponse.isEmpty()) { if (jsonResponse.isEmpty()) {