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
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.
The error code.
This will be sent as an HTTP status code, or WebSocket close code.
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.