Skip to content

Server Errors

A Server Error can be a generic error, a bug, an informational alert, an error logged purely for records, or similar. Archivian captures errors that occur and, in some cases, passes them to your server. These can be viewed in an error log, and — depending on your settings — a copy is sent to a Discord channel.

They range from Archivian failing to process something (a bug, anomaly, or incorrect setting) to Discord-related errors such as a channel no longer existing or a user having DMs turned off.

One goal is to make it easier to know why something happened, and get hints on how to fix it. For example, if a channel used for logging gets deleted, Archivian will hit an error when it tries to log there — not necessarily a bug on our part. Or if the bot isn’t logging despite a channel being set, the errors may indicate it lacks the permissions needed to post there.

Members often report that “the bot isn’t working.” With server errors, you and your staff can quickly identify what went wrong, whether it’s on our end or a misconfiguration, and tell the member it’s been recorded and is being looked into.

When something goes wrong, it can be frustrating not knowing whether it’s our fault, a misconfiguration, or an anomaly. Not everyone finds this useful, but for those who do, it’s nice to be kept in the loop.

What you can do varies — sometimes you can act, sometimes you can’t; sometimes it’s our fault, sometimes yours, sometimes both. If it’s bug-like, we receive an error capture too, so you don’t have to file a bug report (though you’re welcome to). What you can do often depends on the type:

  • Archivian error — something specific to Archivian went wrong, likely a bug that was also sent to us. Usually there’s little you can do beyond informing your users (if relevant) and watching for a fix. Sometimes it’s a limitation error rather than a bug.
  • Discord error — something specific to Discord went wrong, most likely the bot lacking a permission or a channel no longer existing. These are usually something you can fix by adjusting settings (enable DMs, allow the bot to send/read messages, etc.). Occasionally it’s a bug on our end, which we also receive.

How big an impact the error (may) have, from unimportant to critical. We decide the severity, so you may not always agree with our ratings.

  • Log — unimportant; stored for record keeping.
  • Information — not too important; informational, or things worth noting/fixing.
  • Warning — an important alert that should be fixed.
  • Critical — a very important error to address as soon as possible; can be security-related.

Two types: Discord and Archivian.

  • Discord — occurred when Archivian tried to interact with Discord. Ranges from permission issues to Discord being down or a bug on our part, but is most often permission-related (e.g. no permission to DM or send an embed) or a resource no longer existing. Often includes an error code (below).
  • Archivian — occurred in our code. Ranges from a lack of permissions to a breaking bug; if not a bug, usually a limitation error (a limit exceeded, or something disallowed by how Archivian works). Often uses our own error code system.

A server error often includes an error code whose meaning depends on the type. For a Discord error it’s always one of Discord’s own error codes; for an Archivian error it’s from our own system, modelled on Discord’s.

Always unique. Use it to cross-reference an error a user hit with an error event stored in your dashboard, making it easy to pin down exactly what went wrong for a given user.

Not unique. Identifies the context in which the error was encountered — e.g. the execution of a specific command, or generic alerting. It’s a camel-case string separated by periods, such as queue.guildError.message (when Archivian tried to send a Guild Error alert but failed). Mostly for internal use, but sometimes clear enough to hint at the context, and helpful in a bug report to locate where the bug occurred.

Often explains what went wrong, or at least gives more context. In some cases it’s the actual error itself.

The actual error that occurred. Usually only useful to developers, but can speed up a bug report.

Sometimes populated with arbitrary data — references to other events, or a related data structure. May or may not help with self-debugging, and can be useful in a bug report.