Skip to content

Commit

Permalink
Merge pull request #667 from FgForrest/666-invalid-classification-of-…
Browse files Browse the repository at this point in the history
…restinternalerror

fix(#666): internal error for invalid REST request body
  • Loading branch information
lukashornych authored Sep 9, 2024
2 parents e73112f + b14f3d2 commit 4819269
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected <T> CompletableFuture<T> parseRequestBody(@Nonnull RestEndpointExecuti
try {
return restHandlingContext.getObjectMapper().readValue(content, dataClass);
} catch (JsonProcessingException e) {
throw new RestInternalError("Could not parse request body: ", e);
throw new RestInvalidArgumentException("Invalid request body: " + e.getLocation().toString(), e);
}
});
}
Expand Down

0 comments on commit 4819269

Please sign in to comment.