Closed rrcobb closed 6 years ago
This is also causing currentUser.createRoom
to fail.
The line in question can be found here (it needs to be updated to accept a 201
also):
It looks like you just need to upgrade they version of pusher-platform
as this was fixed there:
@rrcobb sorry I didn't see this issue sooner - I had neglected to watch the repo.
@troygoode is correct and we're going to release a new version of pusher-platform-js and the Chatkit JS SDK today!
And thanks for the report!
Should be fixed in 0.1.2
🙂
A successful call to
currentUser.addMessage
ends up rejecting instead of resolving on success.It looks like the request is successful, but the response parsing logic is wrong in
executeNetworkRequest
in the core. A 201 response is a successful object creation, but the handler is looking for status codes of 200 only, and rejecting otherwise.In the chrome backtrace,
(I don't have pusher's sourcemaps on, so not quite sure where this is.)
Not the worst, but surprising that a successful create would end up with the promise rejecting instead of resolving.