Skip to content

Commit

Permalink
Fix typos and improve error messages in JWTFilter
Browse files Browse the repository at this point in the history
Corrected typos in the JWTFilter error messages to enhance clarity. Updated the language for better understanding when exceptions are thrown.
  • Loading branch information
Gcolon021 committed Sep 17, 2024
1 parent 215736b commit 0f2ab36
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ private HashMap<String, Object> prepareRequestMap(ContainerRequestContext reques
} catch (IOException e1) {
logger.error("IOException caught trying to build requestMap for auditing.", e1);
throw new NotAuthorizedException(
"The request could not be properly audited. If you recieve this error multiple times, please contact an administrator."
"The request could not be properly audited. If you receive this error multiple times, please contact an administrator."
);
}
}
Expand Down Expand Up @@ -353,18 +353,16 @@ private boolean callOpenAccessValidationEndpoint(ContainerRequestContext request
"callOpenAccessValidateEndpoint() Open access validate endpoint return invalid response, content: {}",
responseContent
);
throw new ApplicationException("Open access validate endpoint return invalid response");
throw new ApplicationException("Open access validate endpoint returned an invalid response");
}

isValid = responseContent.asBoolean();
} else {
logger.error(
"callOpenAccessValidateEndpoint() error back from open access validate host server [{}]: {}", openAccessValidateUrl,
"callOpenAccessValidateEndpoint() error returned from psama [{}]: {}", openAccessValidateUrl,
EntityUtils.toString(response.getEntity())
);
throw new ApplicationException(
"Open access validate host server returned " + response.getStatusLine().getStatusCode() + ". Please see the log"
);
throw new ApplicationException("Not able to validate open access request");
}

} catch (IOException ex) {
Expand Down

0 comments on commit 0f2ab36

Please sign in to comment.