Format Java Backend Exceptions#1777
Conversation
783696a to
92374af
Compare
|
@Mythicaeda will do some smoke testing of this against the current version of the UI to make sure the new message format is fully supported |
|
Discussed this one with @Mythicaeda yesterday and we realized that the endpoints used by Hasura queries (listed in |
1d4c1f7 to
0280ffd
Compare
0280ffd to
cb29393
Compare
Catch DatabaseException in `apply`. This exception should be revisited, as it's one of three wrappers around SQLException that are classified as "RuntimeExceptions"
e8d8af3 to
6bdabc5
Compare
|
FYI @Mythicaeda I merged |
dandelany
left a comment
There was a problem hiding this comment.
Thanks @Mythicaeda - this required some more changes on the UI than we originally thought, but I think we're finally there. This has been reviewed and tested with the latest NASA-AMMOS/plandev-ui#1933 and they are ready to merge (together)
|


Description
This PR does three things:
extensionsobjectNumber 2) is accomplished by pulling FormattedError out into the
parsing-utilslibrary, then creating service-specific subclasses to handle service-specific exceptions.Verification
E2E Tests were updated to reflect the updates to the error messages.
I did some manual tests with the UI. In these tests, I started a debugger in the backend with a breakpoint set at the start of the Hasura Action Handler code. After submitting the request via the UI, I would go in and remove data from the database to force the backend pre-checks to fail. I'd then resume the backend and observe that 1) the backend was sending the information correctly and 2) how the UI was parsing the response.
What I observed was:
extensionsobjectextensionsobject and is able to extractdata,service, andtimestampout of it. It's unclear if it's using the top-levelmessagefield or the one in theextensionsobject, but that doesn't matter since they contain the same string.typefield out of theextensionsobject, instead using a genericERRORtype. Thetypefield is present inextensionsobjectLOGStab rather than being sorted into the correct category.Example:
Server Response:
{ "errors": [ { "extensions": { "data": { "specification_id": 659 }, "message": "Could not check permissions on scheduling specification 659: specification does not exist.", "service": "aerie_permissions", "timestamp": "2026-05-18T16:10:49.084229462Z", "trace": <TRACE REMOVED BY ME FOR CONCISENESS>, "type": "NO_SUCH_SCHEDULING_SPECIFICATION" }, "message": "Could not check permissions on scheduling specification 659: specification does not exist." } ] }UI Logs:

Documentation
Future work