Skip to content

[task] malformed JSON from HTTP 200 is not normalized into WorkflowError error with Quarkus Rest client #1578

Description

@gmunozfe

What would you like to be added:

Better protection for JSON parsing error

Why is this needed:

When a response is HTTP 200 OK, Content-Type: application/json, with an unparseable json in the body, and then Jackson parser fails while reading it.

The stack confirms the failure comes from ClientJacksonMessageBodyReader and is caused by JsonParseException.

However, with the Jersey provider, the invalid JSON is converted into a workflow error:

{
  "type": "https://serverlessworkflow.io/spec/1.0.0/errors/data",
  "status": 422,
  "details": "Error reading entity from input stream."
}

This should be the same independently of the REST client.

Metadata

Metadata

Assignees

Labels

javaPull requests that update java code

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions