-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decoding issue for 40010 Error (Invalid Channel Name) #569
Comments
@umair-ably I assume that error parsing code should be using the same logic as when decoding successful responses: Lines 100 to 105 in dff73cd
|
@lmars I'd assume so too with it failing to decode to json. This is the raw text printed out before it attempts to decode it:
|
@umair-ably yes, so that is msgpack, evident from the error "can't decode byte 0x81 in position 0", which from my many hours of inspecting raw msgpack is the start of a msgpack encoded map containing one key-value pair. |
@lmars I'm not sure I follow, are you implying the user is incorrectly assuming they will get a json response when instead it's actually a msgpack response? |
Hi, original reporter of the issue here: We're using msgpack in frontend via the I think @lmars is on the right track with the content type switch, since the error response handler just assumes Json at all times, as opposed to conditionally using msgpack or json. |
@umair-ably apologies, let me explain. The realtime system supports returning responses encoded as either JSON or msgpack, and the SDK indicates which encoding it wants by setting the HTTP It seems to me that within the SDK, it calls I think this is therefore a bug in the SDK, specifically that |
That makes perfect sense - thanks @lmars! I'll get this prioritised in our next sprint planning |
I've proposed a fix for this in #571, since this came up as a problem in some internal testing too. |
Hi @lmars, can we get this fix released to Pip? |
Hey @AlexanderArvidsson, I've raised this internally and we'll get it released asap. |
Hey @AlexanderArvidsson, thanks a lot for pointing out that fix hasn't been released. We released |
Publishing a message on an invalid channel causes the SDK to fail to decode the error response appropriately. Example error log:
Reproduction Steps
Publish a message to the ":" channel (or any other invalid channel)
Expected Behaviour
The SDK should correctly decode and return the 40010 error.
Additional Notes:
It's worth triggering a couple of other error codes within the SDK to see if they are decoded appropriately, just to ensure this decoding issue is not a widespread problem.
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: