Skip to content
This repository was archived by the owner on Jul 3, 2021. It is now read-only.
This repository was archived by the owner on Jul 3, 2021. It is now read-only.

addToWaitList throws 403 error when target user has no playlists #154

Description

@tomas-masin

If the bot tries to add a user to the waitlist, and the user has no playlists and/or songs, the bot crashes with this error in log:

Error: https://plug.dj/_/booth/add responded with 403 (FORBIDDEN
  at process.nextTick (D:\PhpstormProjects\HoRM\rockbot-v2\node_modules\plugapi\lib\client.js:625:39)
  at _combinedTickCallback (internal/process/next_tick.js:131:7)
  at process._tickCallback (internal/process/next_tick.js:180:9)

The error doesn't seem to be catchable. At least not like this:

try {
  data.from.addToWaitList();
}
catch (error) {
  bot.sendChat('Error adding a user to waitlist.');
  console.error(error);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions