Skip to content

PublishedServerEventHandlerRpcHandler makes hard to know which client callable failed. #22856

Description

@javier-godoy

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 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]
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)

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.

Activity

  1. added theissue type on Dec 2, 2025
  2. removed theissue type on Dec 2, 2025
  3. added theissue type on Dec 2, 2025
  4. added a commit that references this issue on Oct 20, 2026
    f9bc8c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions