Skip to content

How should the global error handler handle errors when a command/cog has its own error handler? #416

@MarkKoz

Description

@MarkKoz

Currently, if a command or its cog has a local error handler, the global error handler will ignore that error. However, most handlers are typically only concerned with a handful of errors. Therefore, if the global handler is ignoring these errors, they will get silently consumed.

The local handler would have to have some catch-all (and some do). A catch-all isn't ideal because it wouldn't provide nearly as detailed information as deferring to the global handler would. But in order to defer to the global handler, the handler would need to be able to distinguish handled and unhandled errors. One solution is to set some attribute on the context or the error itself for which the global handler could check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: backendRelated to internal functionality and utilities (error_handler, logging, security, utils and core)p: 2 - normalNormal Prioritys: planningDiscussing detailss: staleHas had no activity for a whilet: featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions