[ 
https://issues.apache.org/jira/browse/IGNITE-23195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vadim Pakhnushev updated IGNITE-23195:
--------------------------------------
    Description: 
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:
{code}
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"])
{code}


  was:
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}



> 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
>            Priority: Major
>              Labels: ignite-3
>
> 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:
> {code}
> 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"])
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to