diff --git a/src/main/java/com/microsoft/graph/core/requests/ResponseBodyHandler.java b/src/main/java/com/microsoft/graph/core/requests/ResponseBodyHandler.java index 5e21df42..4547309e 100644 --- a/src/main/java/com/microsoft/graph/core/requests/ResponseBodyHandler.java +++ b/src/main/java/com/microsoft/graph/core/requests/ResponseBodyHandler.java @@ -85,7 +85,7 @@ private void handleFailedResponse(Response nativeResponse, HashMap= 400 && statusCode <= 499 && errorMappings.containsKey("4XX"))) { + if (statusCode >= 400 && statusCode <= 499 && errorMappings.containsKey("4XX")) { statusCodePattern = "4XX"; } else if (statusCode >= 500 && statusCode <= 599 && errorMappings.containsKey("5XX")) { statusCodePattern = "5XX";