-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
This should not be possible, please report a detailed bug at error when error is very clear #1606
Comments
@zachdaniel Is this fixed? Seems like it is.
|
You have to first |
I didn't reproduce the same error but something similar:
which happens on:
This happens in
My idea is adding some kind of validation in the with chain before: |
Yeah, that would make sense to me 😄 |
Okay cool. One more technical question: |
Oh, I would not try to an analyze the expression yourself. just make sure that the error from |
Yea, that does make more sense. ⭐
I will put |
Yeah, that code is pretty convoluted as well, so make sure that any other usages of those functions are updated. Are they public? I forget. |
Bug Report
Describe the Bug
When attempting to use
Ash.Sort.expr_sort
with a resource or relationship that does not exist, the error message suggests reporting a bug instead of providing a clear and direct error message about the invalid resource/relationship.To Reproduce
Add the following code to a resource:
And you get the error
Expected Behavior
A more specific error message pointing directly to the Ash.Sort.expr_sort call and that it is a human error. Not asying that you should report a bug here.
Runtime
[ - Elixir version](elixir: "> 1.16",)
{:ash, "> 3.4.37"},
{:ash_postgres, "> 2.4.12"},
{:ash_phoenix, "> 2.0"},
{:ash_admin, "> 0.11.9"},
{:ash_authentication, "> 4.2.7"},
{:ash_authentication_phoenix, "~> 2.1.2"},
The text was updated successfully, but these errors were encountered: