Vadim Pakhnushev created IGNITE-23195:
-----------------------------------------
Summary: AssertionError is not handled in REST API
Key: IGNITE-23195
URL: https://issues.apache.org/jira/browse/IGNITE-23195
Project: Ignite
Issue Type: Bug
Components: rest
Reporter: Vadim Pakhnushev
Assignee: Vadim Pakhnushev
When AssertionError is thrown from the controller's code, the default error
response is constructed by Micronaut which looks like this:
{code:json}
{"message":"Internal Server
Error","_links":{"self":{"href":"/management/v1/recovery/partitions/restart","templated":false}},"_embedded":{"errors":[{"message":"Internal
Server Error: null"}]}}
{code}
but it has a {{application/problem+json}} content type, which triggers CLI REST
API exception handler to parse it and fail with:
{noformat}
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized
field "message" (class org.apache.ignite.rest.client.model.Problem), not marked
as ignorable (8 known properties: "traceId", "detail", "status", "title",
"type", "code", "node", "invalidParams"])
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)