Poison.Encoder.List Error on Memento Output

I am getting a weird error after switching to memento from Amnesia. It is write when I call the Poison.encode! on a list of objects returned from Memento.Query.select call.

Error occurs on this: send_resp(200, Poison.encode!(results))

Actual error: no function clause matching in Poison.Encoder.List."-encode/3-lists^foldr/2-1-"/3

That’s not specific at all. I’d start with trying to manually serialise objects in an iex console session. But when you report it like that, I’m not sure anyone can help.

1 Like

Yeah I get it. New to the language so frankly the biggest part of the problem. Thanks for commenting. Just very opaque.


Welcome to the forum.

Can you explain what are you trying to accomplish?

Can you share some code and what you have tried?

What you expected for that code to do?

This way a lot of people here on forum can help and also will be alot easier to find solutions for your problem.