Skip to content
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

Removing expired strikes sometimes returns an "Unknown Member" API error #6

Open
1 task done
pfist opened this issue Sep 26, 2022 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@pfist
Copy link
Member

pfist commented Sep 26, 2022

Was this issue already reported?

  • I have searched the existing issues

On which platform did you encounter this issue?

Desktop app

What happened

I've noticed in the logs that sometimes, when an expired strike is removed, the cron job returns an "Unknown Member" error from the Discord API.

This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
DiscordAPIError[10007]: Unknown Member
    at SequentialHandler.runRequest (/home/pfist/bots/quinn/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:293:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SequentialHandler.queueRequest (/home/pfist/bots/quinn/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:99:14)
    at async REST.request (/home/pfist/bots/quinn/node_modules/@discordjs/rest/dist/lib/REST.cjs:52:22)
    at async GuildMemberManager._fetchSingle (/home/pfist/bots/quinn/node_modules/discord.js/src/managers/GuildMemberManager.js:489:18)
    at async Cron.fn (file:///home/pfist/bots/quinn/src/listeners/client-ready.js:52:24)

What you expected

  • The expired strike should be set to False in the database
  • The user should be notified if they're accepting DMs from Manny
  • If Manny fails to notify the user, we should log a warning message

Steps to reproduce

  1. Let any strike expire
  2. View the application logs
  3. Sometimes, this error is returned.
@pfist pfist added the bug Something isn't working label Sep 26, 2022
@pfist pfist transferred this issue from unreal-source/manny Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant