Skip to content

Commit

Permalink
Fix GetOutput status code error handling -_-" (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed Jun 3, 2024
1 parent 52227b9 commit 8788369
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ public CompletableFuture<Output<Res>> getOutputAsync(RequestOptions options) {
throw new IngressException("Error when executing the request", throwable);
}

if (response.statusCode() >= 300) {
handleNonSuccessResponse(response);
}

if (response.statusCode() == 470) {
return Output.notReady();
}

if (response.statusCode() >= 300) {
handleNonSuccessResponse(response);
}

try {
return Output.ready(resSerde.deserialize(response.body()));
} catch (Exception e) {
Expand Down Expand Up @@ -347,14 +347,14 @@ public CompletableFuture<Output<Res>> getOutputAsync(RequestOptions options) {
throw new IngressException("Error when executing the request", throwable);
}

if (response.statusCode() >= 300) {
handleNonSuccessResponse(response);
}

if (response.statusCode() == 470) {
return Output.notReady();
}

if (response.statusCode() >= 300) {
handleNonSuccessResponse(response);
}

try {
return Output.ready(resSerde.deserialize(response.body()));
} catch (Exception e) {
Expand Down

0 comments on commit 8788369

Please sign in to comment.