-
-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The onConnect handler says throwing an error propagates that message to the client:
Lines 214 to 217 in 5161bd9
* Throwing an error from within this function will | |
* close the socket with the `Error` message | |
* in the close event reason. | |
*/ |
However, this isn't true in production:
graphql-ws/src/use/uWebSockets.ts
Lines 206 to 207 in 5161bd9
isProd | |
? 'Internal server error' |
So if the client handles things differently based off that message, it'll work great in development, but break in production 😬 .
Looks like the reason was to limit the size of the message, which is understandable, but chances are most messages will still be < 1 MTU so it shouldn't make any real difference. Would it be possible to send the message to the client so the code works in prod just like it does in dev?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request