Skip to content

Commit

Permalink
Improve user_not_found handling
Browse files Browse the repository at this point in the history
  • Loading branch information
zerodytrash committed Mar 15, 2024
1 parent 2ca2da9 commit 7879a9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiktok-live-connector",
"version": "1.1.4",
"version": "1.1.5",
"description": "Node.js module to receive live stream chat events like comments and gifts from TikTok LIVE",
"main": "index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ class WebcastPushConnection extends EventEmitter {
sourceType: 54,
});

if (roomData.statusCode) throw new Error(`API Error ${roomData.statusCode} (${roomData.message || 'Unknown Error'})`);

this.#roomId = roomData.data.user.roomId;
this.#clientParams.room_id = roomData.data.user.roomId;
}
Expand Down

0 comments on commit 7879a9d

Please sign in to comment.