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

Add an additional error class to expose application and/or temporary errors #1071

Open
rbino opened this issue Apr 29, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@rbino
Copy link
Contributor

rbino commented Apr 29, 2024

Is your feature request related to a problem? Please describe.
Currently we have:

    forbidden: Ash.Error.Forbidden
    invalid: Ash.Error.Invalid
    framework: Ash.Error.Framework
    unknown: Ash.Error.Unknown

but once you start adding your own Application errors using Splode there should be an additional class between invalid and framework, something like temporary or a generic application that can apply to things like:

  • I'm querying an external API and it's currently unavailable
  • You're being rate limited

invalid seems to express a condition that is true always, and framework expresses something that is internal and where the user has no influence. There should be something that expresses "Maybe try in a bit ¯_(ツ)_/¯"

Describe the solution you'd like
Add another error class that can be used from this kind of errors.

Describe alternatives you've considered
@zachdaniel mentioned "a thing you can do with splice where you can write your own splode with your own error classes, and use it on the error returned" but I don't have more context about this

@rbino rbino added enhancement New feature or request needs review labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants