DEV UI - Enable error handling for JSON RPC client and normal requests-response cases #33648
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JSON RPC client doesn't take into consideration that failed requests doesn't have response-type (more precisely, it's data property contains
error
object and notresponse
object), which means requests throws error ondevUiResponse
being undefined (JS analogy to NPE) herequarkus/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/controller/jsonrpc.js
Line 248 in 2a867ee
This happens (at the very least) when my JSON RPC Service returns failed
Uni
and on client side, Promise
then
method orcatch
are never called. In practice, it means if I want to provide error handling, I have to introduce wrapper that contains actual response and error object and make sure Uni is never failed.I'd rather do this
@phillip-kruger I need to provide error handling for #32031 as we have external requests to OIDC providers, but please let me know if you want me to open issue and handle it yourself. I only added here handling of normal request-responses that fails as that's what I need. Thanks!