You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected Behaviour
I expected it to treat null as a valid value to be received through the payload property, or at least not throw an error in this case.
Actual Behaviour
Right now if the server for some reason returns the payload as null the following error is thrown: "connection_ack" message expects the 'payload' property to be an object or missing, but got "null"
This error stops the connection and prevents the websocket from being used.
Debug Information
This is the commit where the error throw was added.
Before that, apparently, this situation wasn't an issue simply because it doesn't stop the websocket connection, right!? (Not sure about that)
I tried to use both jsonMessageReviver and jsonMessageReplacer to intercept the payload and turn it into undefined to prevent the error throw, but I had no success. Is there a way to do that?
Further Information
Sadly I can't change the backend right now for other reasons.
Thank you very much in advance for the help!
The text was updated successfully, but these errors were encountered:
I agree! Decreasing message size is definitely the better approach. Sadly we can't change this on the backend right now, we're using another third-party library there, which also has been informed about the "null issue". It's a corner case between both libraries.
Thank you very much for the quick response! We're going to wait for the fix!
Screenshot

Expected Behaviour
I expected it to treat
null
as a valid value to be received through thepayload
property, or at least not throw an error in this case.Actual Behaviour
Right now if the server for some reason returns the
payload
asnull
the following error is thrown:"connection_ack" message expects the 'payload' property to be an object or missing, but got "null"
This error stops the connection and prevents the websocket from being used.
Debug Information
This is the commit where the error throw was added.
Before that, apparently, this situation wasn't an issue simply because it doesn't stop the websocket connection, right!? (Not sure about that)
I tried to use both
jsonMessageReviver
andjsonMessageReplacer
to intercept thepayload
and turn it intoundefined
to prevent the error throw, but I had no success. Is there a way to do that?Further Information
Sadly I can't change the backend right now for other reasons.
Thank you very much in advance for the help!
The text was updated successfully, but these errors were encountered: