Skip to content

Hi i wonder why @controllerAdvice can not catch exception thrown in websocket-stomp #34336

@horanga

Description

@horanga

I'm developing a chat service using Spring WebSocket/STOMP, and I have a question about the exception handling design.

Current Understanding

  • I understand that WebSocket uses a different protocol from HTTP
  • Spring's @ControllerAdvice works well with HTTP-based controllers for global exception handling
  • WebSocket/STOMP exceptions are not caught by @ControllerAdvice

Technical Question

I'd like to understand the architectural decisions behind this design:

  1. Why can't @ControllerAdvice intercept WebSocket/STOMP exceptions?
  2. Is this due to different execution contexts between HTTP and WebSocket?

This is not a bug report but rather a question to understand the framework's design decisions better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: messagingIssues in messaging modules (jms, messaging)status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions