You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the tableExport API, and currently trying to conditionally enable a PDF formatter on specific resource types(as it requires prerequisites such as an HTML template .. etc), hence, I throw an exception inside the formatter whenever an unsupported resource type is requested to be exported.
Expected Behavior
To have the exception message in the queueing response alongside the status code(4xx, maybe 422), something like this:
{
"data": {
"type": "tableExport",
"id": "011f99aa-cc41-4c5b-bbb0-d3478aa9d8ac",
"attributes": {
..."result": {
..."recordCount": null,
"httpStatus": 422,
"url": null,
"message": "Type [xxx] is not PDF exportable."
}
}
}
}
Current Behavior
I get everything as expected unless for the status code, returning 200.
{
"data": {
"type": "tableExport",
"id": "011f99aa-cc41-4c5b-bbb0-d3478aa9d8ac",
"attributes": {
..."result": {
..."recordCount": null,
"httpStatus": 200,
"url": null,
"message": "Type [xxx] is not PDF exportable."
}
}
}
}
Steps to Reproduce
Create a custom formatter for table export api.
Throw an error inside the formatter.
Try to trigger the formatter through table export api.
Context
Trying to inspect the status of the requested export.
Async API
TableExport API
Your Environment
Elide version used: 7.1.2
Environment name and version (Java 1.8.0_152): openjdk 17.0.9 2023-10-17
Operating System and version: MacOS 10.15
Spring boot: 3.2.5
The text was updated successfully, but these errors were encountered:
This looks like it is currently by design, similar to GraphQL where queries always return HTTP status code 200. If message is set an error has occurred.
I'm using the tableExport API, and currently trying to conditionally enable a PDF formatter on specific resource types(as it requires prerequisites such as an HTML template .. etc), hence, I throw an exception inside the formatter whenever an unsupported resource type is requested to be exported.
Expected Behavior
To have the exception message in the queueing response alongside the status code(4xx, maybe 422), something like this:
Current Behavior
I get everything as expected unless for the status code, returning 200.
Steps to Reproduce
Context
Trying to inspect the status of the requested export.
Async API
TableExport API
Your Environment
The text was updated successfully, but these errors were encountered: