com.lightbend.lagom.scaladsl.api.deser
The error code.
The error code.
This will be sent as an HTTP status code, or WebSocket close code.
The message.
The protocol.
Get the message as text.
Get the message as text.
If this is a binary message (that is, the message protocol does not define a charset), encodes it using Base64.
A serialized exception message.
A serialized exception message consists of a transport error code, a protocol, and a message body. All, some or none of these details may be sent over the wire when the error is sent, depending on what the underlying protocol supports.
Some protocols have a maximum limit on the amount of data that can be sent with an error message, eg for WebSockets, the WebSocket close frame can have a maximum payload of 125 bytes. While it's up to the transport implementation itself to enforce this limit and gracefully handle when the message exceeds this, exception serializers should be aware of this when producing exception messages.