Comments (1)
The error is caused in this snippet:
await pubnub.addMessageAction({
channel: channelName,
messageTimetoken: timetoken,
action: {
type: 'isRead',
value: true,
},
},
function(status, response) {
if (status.error) {
return status
} else {
return response
}
}
);
The problem is that all the values inside the action object should be a string. I used a boolean and that's what caused the issue. The documentation specifies that I should use a string value I overlooked. However, an internal server error response for this error is misinformative.
This fixes the issue:
await pubnub.addMessageAction({
channel: channelName,
messageTimetoken: timetoken,
action: {
type: 'isRead',
value: 'true',
},
},
function(status, response) {
if (status.error) {
return status
} else {
return response
}
}
);
from javascript.
Related Issues (20)
- Buttons in smaller devices touches each other HOT 7
- Button width is not responsive in smaller device HOT 2
- deprecated [email protected] HOT 3
- Listener exception generates status 400, error should contain contextual error information HOT 3
- PNNetworkIssuesCategory in ios ionic capacitor app HOT 2
- vm2 resulting in critical Audit failure for PubNub SDK HOT 6
- @types/pubnub missing getToken HOT 2
- messages not compressed
- pubnub.push.listChannels only return 500 channels MAX
- What's the deal with the license? HOT 1
- Accessing active listeners HOT 6
- Case sensitive path issue HOT 1
- Formidable / Superagent Build Issue With Nextjs & Typescript HOT 9
- decrypt method of legacyCryptoModule throws an error for unencrypted string values with "_" HOT 3
- Documentation around the setProxy method
- SDK Migration from pn_gcm to pn_fcm (HTTP v1 FCM)
- PNBadRequestCategory when using grantToken after an upgrade from v7 to v8 of the API HOT 1
- Module parse failed: Unexpected token. You may need an additional loader to handle the result of these loaders.
- Typings for new features (Event Engine & Listeners)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javascript.