Skip to content

Commit

Permalink
Fix mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerwowen committed Dec 10, 2024
1 parent dbd5e49 commit 552a79f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ protected void mapResponseToException(int responseCode, String responseBody)
case 400:
throw new BadRequestException(responseBody);
case 401:
throw new ForbiddenException(responseBody);
case 403:
throw new NotAuthorizedException(responseBody);
case 403:
throw new ForbiddenException(responseBody);
case 404:
throw new NotFoundException(responseBody);
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ void testRequestWithBodyServerError(String method) {
void testMapResponseToException() {
String response = "error";
assertThrows(BadRequestException.class, () -> sut.mapResponseToException(400, response));
assertThrows(ForbiddenException.class, () -> sut.mapResponseToException(401, response));
assertThrows(NotAuthorizedException.class, () -> sut.mapResponseToException(403, response));
assertThrows(NotAuthorizedException.class, () -> sut.mapResponseToException(401, response));
assertThrows(ForbiddenException.class, () -> sut.mapResponseToException(403, response));
assertThrows(NotFoundException.class, () -> sut.mapResponseToException(404, response));
assertThrows(ClientErrorException.class, () -> sut.mapResponseToException(429, response));
assertThrows(ServerErrorException.class, () -> sut.mapResponseToException(500, response));
Expand Down

0 comments on commit 552a79f

Please sign in to comment.