-
Notifications
You must be signed in to change notification settings - Fork 155
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
SyntaxError: Unexpected token u #124
Comments
hmm I don't think we really have any asserts in place (delegating that to the user) so you may want to add a few for data being sent. One thing for debugging is to add |
re-open if it turns out to be axon but I think there's just some input getting messed |
I had to step away but before I left I think I discovered that the buffer |
interesting! that would be weird, let me know if you find anything |
Ha silly human make mistake. Don't mind me, just...passing |
It seems like it would be valuable to catch errors thrown during the deserialization process and enable the user of |
we should add asserts on input, and assume everything that gets in is valid. Even just |
+1 to assert. gogogo! |
Alright, so I can make the tests fail by adding The message is then encoded as a buffer containing Also, given that Anywho, I submitted pull request #125, but it'll need some revision. |
for amp-message I'd almost rather just convert it to null and send that, since it's a valid value, just not ideal since it usually represents a user error. Maybe we should do that instead, there's nothing really wrong with sending undefined |
Sounds good to me, 👍 for simplicity. Alternatively, if we don't want to break some weird fringe case that somehow depends on the value being exactly |
I'm not sure what's causing this yet, apart from the obvious that
JSON.parse
is passedundefined
. I'm not trying to do anything particularly fancy, I'll see if I can track it down or reduce it to a workable test-case.Node v0.10.24 and v0.10.26.
The text was updated successfully, but these errors were encountered: