gordoneliel
Ash Embedded + Custom types error: UnknownError{error: "** (ArgumentError)
Whenever I try to use a custom type like ex_money or a custom type I create, ash does not seem to be able to load an embedded resource. Not sure if I’m missing some config with embedded resources or this is a bug.
Here is an example error with a volume type:
%Ash.Error.Unknown{
errors: [
%Ash.Error.Unknown.UnknownError{error: "** (ArgumentError) cannot load `[%{\"autogenerated_id\" => \"0f887d5a-d861-49c5-ac39-9a33ec5b732c\", \"from_volume\" => [\"cu_ft\", 0], \"price\" => [\"USD\", \"1\"], \"to_volume\" => [\"cu_ft\", 10]}]` as type {:array, #EmbeddedResource.EctoType<[]>
}
First Post!
gordoneliel
Weirdly I have to implement Jason.Encoder for tuples for it to even get to this error. I figured it has something to do with the Ash type, since I’m able to use these custom types in non Ash projects.
%Ash.Error.Unknown{
errors: [%Ash.Error.Unknown.UnknownError{
error: "** (Protocol.UndefinedError) protocol Jason.Encoder not implemented for {\"cu_ft\", 0} of type Tuple, Jason.Encoder protocol must always be explicitly implemented. This protocol is implemented for the following type(s): Any, Ash.CiString, Ash.Union, Atom, BitString, Cldr.LanguageTag, Date, DateTime, Decimal, Ecto.Association.NotLoaded, Ecto.Schema.Metadata, ...
0
Popular in Questions
Hi,
I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
Using vs code and installed ElixirLS: support and debugger.
And I got an error popped up on start up says
Failed to run ‘elixir’ comma...
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
Other popular topics
Hi!
In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir?
Searched the docs for ip address and the web, no good results.
Thanks!
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
What is the idiomatic way of matching for not nil in Elixir?
E.g.,
First way:
defp halt_if_not_signed_in(conn, signed_in_account) when...
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Latest Ash Threads
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









