Skip to content

Commit

Permalink
set the correct http status if chargeboxid is not recognized (#1020)
Browse files Browse the repository at this point in the history
  • Loading branch information
goekay committed Jan 4, 2023
1 parent f0eac5c commit 4761d6a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ public boolean doHandshake(ServerHttpRequest request, ServerHttpResponse respons
// Allow connections, if station is in db (registration_status field from db does not matter)
boolean allowConnection = status.isPresent();

// https://github.com/steve-community/steve/issues/1020
if (!allowConnection) {
log.error("ChargeBoxId '{}' is not recognized.", chargeBoxId);
response.setStatusCode(HttpStatus.UNAUTHORIZED);
response.setStatusCode(HttpStatus.NOT_FOUND);
return false;
}

Expand Down

0 comments on commit 4761d6a

Please sign in to comment.