1005 is "designated for use in applications expecting a status code
to indicate that no status code was actually present."
1002 is for telling the other endpoint that there was a protocol
error. Giving the application 1002 on a parse error is misleading,
as it's indistinguishable from the far endpoint complaining about something
you sent being invalid.
1005 is "designated for use in applications expecting a status code to indicate that no status code was actually present."
1002 is for telling the other endpoint that there was a protocol error. Giving the application 1002 on a parse error is misleading, as it's indistinguishable from the far endpoint complaining about something you sent being invalid.