Skip to content

Question: clarity on subclassing from rescue_registry vs graphiti-rails #47

@jasonkarns

Description

@jasonkarns

I have to admit, I'm a bit confused about the current state of exception handling between graphiti_errors, rescue_registry, and graphiti-rails.

As best as I can tell, graphiti_errors is essentially deprecated. rescue_registry is where I should be looking for things, and graphiti-rails has already switched to use rescue_registry.

My current question is which class I should be subclassing for my custom exception handler. I am in a Rails app and using graphiti-rails; so my natural inclination is to subclass Graphiti::Rails::ExceptionHandler. However, I'm a bit surprised that ApplicationController.default_exception_handler is an instance of RescueRegistry::ExceptionHandler. I would have expected that graphiti-rails would have made the default handler use Graphiti::Rails::ExceptionHandler.

So now that I'm creating my own custom handler, I want to diverge from the default handler as little as possible. Which has me unsure which one I should actually subclass. Truth be told, I'm not even entirely clear what Graphiti::Rails::ExceptionHandler even does over RescueRegistry::ExceptionHandler.

Any guidance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions