Malformed workflow WebSocket messages are not reported
- Dominant language
- Scala
- Stars
- 314
- Forks
- 187
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 214
Description
### Feature Summary
Root cause: `WorkflowWebsocketResource.myOnMsg` parses each message before entering its existing error handler. Malformed JSON therefore escapes without producing the `WorkflowErrorEvent` used for every other request failure.
Before: Malformed JSON throws and the client receives no error event.
Expected: Malformed JSON produces a `WorkflowErrorEvent` and the exception still reaches the WebSocket container.
Reproduction evidence:
1. Check out main at commit `caeb27ea54`.
2. Register a session state and call `myOnMsg` with an incomplete JSON object.
3. Observe that parsing throws before the session receives an error payload.
A focused runtime test failed with 0 tests passing and 1 test failing because the expected send never occurred.
Version and commit evidence:
Main, version 1.3.0 incubating snapshot.
**Commit Hash (Optional)**
`caeb27ea54`
## Browsers
Not applicable. This is a WebSocket server issue.
## Relevant log output
```text
Total number of tests run: 1
Tests: succeeded 0, failed 1, canceled 0, ignored 0, pending 0
```
### Proposed Solution or Design
Expected: Malformed JSON produces a `WorkflowErrorEvent` and the exception still reaches the WebSocket container.
### Affected Area
Workflow Engine (Amber)
Contributor guide
Assessment
This issue has not been assessed yet.