joffrey-bion / krossbow

A Kotlin multiplatform coroutine-based STOMP client over websockets, with built-in conversions.
MIT License
205 stars 16 forks source link

Provide the full `ERROR` frame body as message in `StompErrorFrameReceived` #580

Closed joffrey-bion closed 1 month ago

joffrey-bion commented 1 month ago

At the moment, the message of the StompErrorFrameReceived exception only contains the message header from the ERROR frame. This is often not sufficient to resolve the issue.

For example, users can get a Bad CONNECT message when connecting at the STOMP level. The body of the frame would add the following information, which is really useful:

Virtual host 'aroundgame.ru' access denied

Appending the body of the ERROR frame to the exception message would go a long way in helping debugging issues.