Repository navigation
Description
Describe your motivation
When the argument of a ClientCallable cannot be deserialized, the exception is just an IllegalArgumentException thrown by Jackson, with no indication of which method failed.
elemental.json.JsonObject: Cannot construct instance of
elemental.json.JsonObject(no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
at [No location information]
java.lang.IllegalArgumentException: Cannot deserialize JSON to type elemental.json.JsonObject: Cannot construct instance ofelemental.json.JsonObject(no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
at [No location information]
at com.vaadin.flow.internal.JacksonCodec.decodeAs(JacksonCodec.java:234)
at com.vaadin.flow.server.communication.rpc.DefaultRpcDecoder.decode(DefaultRpcDecoder.java:49)
at com.vaadin.flow.server.communication.rpc.PublishedServerEventHandlerRpcHandler.decodeArg(PublishedServerEventHandlerRpcHandler.java:332)
at com.vaadin.flow.server.communication.rpc.PublishedServerEventHandlerRpcHandler.decodeArgs(PublishedServerEventHandlerRpcHandler.java:268)
at com.vaadin.flow.server.communication.rpc.PublishedServerEventHandlerRpcHandler.invokeMethod(PublishedServerEventHandlerRpcHandler.java:222)
at com.vaadin.flow.server.communication.rpc.PublishedServerEventHandlerRpcHandler.invokeMethod(PublishedServerEventHandlerRpcHandler.java:200)
at com.vaadin.flow.server.communication.rpc.PublishedServerEventHandlerRpcHandler.invokeMethod(PublishedServerEventHandlerRpcHandler.java:146)
at com.vaadin.flow.server.communication.rpc.PublishedServerEventHandlerRpcHandler.handleNode(PublishedServerEventHandlerRpcHandler.java:129)
Line 213 in a3c4d35
| throw e; |
Describe the solution you'd like
I would like that the exception (caused by the original IllegalArgumentException) that explicitly mentions the ClientCallable method that was invoked.
Describe alternatives you've considered
As a workaround, you can add a breakpoint in PublishedServerEventHandlerRpcHandler and inspect which method is called.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone / Pending Release
Activity
fix: include method and parameter in RPC decode errors (vaadin#26051)