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

feat: Add canonical error codes for generic error handling. #2711

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 23, 2024

  1. feat: Add canonical error codes for generic error handling.

    Every error enum should have a conversion function to the canonical
    codes list. This can make client code more resilient to additions of
    error codes to per-function error enums, and simplify much of the error
    handling that currently needs to `switch()` over each error enum
    separately.
    
    It's still useful to have additional information from the per-function
    error enums to present the user with better error messages, but for
    programmatic error handling (e.g. bots), the canonical codes should
    always be sufficient context.
    iphydf committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    e8b2925 View commit details
    Browse the repository at this point in the history