Skip to content

Commit

Permalink
check response from login (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlukas authored Oct 8, 2024
1 parent 71fb24c commit 5b3c80b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ private SimpleAuthToken retrieveToken() {
client.execute(
request,
response -> {
if (response.getCode() > 299) {
throw new RuntimeException(
"Unable to login, response code " + response.getCode());
}
String csrfTokenCandidate = null;
Header csrfTokenHeader = response.getHeader(CSRF_HEADER);
if (csrfTokenHeader != null) {
Expand Down

0 comments on commit 5b3c80b

Please sign in to comment.