benonymus
So the erro meassage is :
(exit) an exception was raised:
** (FunctionClauseError) no function clause matching in MyApiWeb.FallbackController.call/2
And the code where it is coming from is :
def create(conn, %{
"description" => description,
"email" => email,
"source" => source,
"subscriptionID" => subscriptionID
}) do
with {:ok, %t{} = t} <- Stripe.Customer.create(%{description: description, email: email}) do
conn
|> IO.inspect(t)
end
end
Thanks
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
Hello folks!
So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication):
toke...
New
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #ai
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
NobbZ
I’m not sure what you try to bind to
tin thewithclause. But regardless what gets bound to it, its either an atom or a map/struct, whileIO.inspect/2expects keywords as its seconds argument (wheretis used).I am totally not sure though, if that is the problem though, since your error message complains about
call/2and you have shown only the create action.To actually find your problem you’ll probably need to show more of your controller, as
call/2is the function that should dispatch the request to your actual action, so the problem is much earlier in the stack.benonymus
I am trying to use stripity stripe, and it is form their documentation, so I am not sure myself.
currently I only have this create action in my controller
NobbZ
There has to be more, some
useor other stuff or there wouldn’t even be thecall/2function from the error message.So could you please share the full controller?
benonymus
sure and thanks
NobbZ
A fallback controller will be called when your actual action fails to return a proper conn.
As the
withcan’t match after my understanding (I’ve explained that above), you always returnnil, which isnt a valid conn. So the fallback will be called. Why that doesn’t have a clause matching, we can’t say, because you haven’t shown it.Also can you please share a link to the resources that gave you the example?
benonymus
well I tried to puzzle it out from many, beause I could not find an example that uses striptiy stripe or elixir with stripe really.
also I am assuming that I am using this wrong but I just dont really understand that what the doc is trying to say
https://github.com/code-corps/stripity_stripe
https://medium.com/@njwest/jwt-auth-with-an-elixir-on-phoenix-1-3-guardian-api-and-react-native-mobile-app-1bd00559ea51
I used this as my base, made it work earlier, so I just used it as a general guide, these were the main ones, but had some other ones too
as for my code the router:
defmodule MyApiWeb.Router do
use MyApiWeb, :router
NobbZ
Sorry I have to say, but I can’t find anything in the links that is like the snippet you posted.
So I have to ask again, where did you found the
t = %t{}pattern? What are you trying to achieve by using it?What is it you want to inspect in the
withs body?torconn?Have you understood what
withis used for?Why do you use a fallback controller at all? Do you really need it? Do you understand what it is meant for?
PS: the router is probably unrelated, the error is raised from your fallback controller.
benonymus
the fallback controller was auto generated, this t = %t{} my friend said it and what it tries to achieev is to get the created user.
I want ot inspect the created user so t in this case.
Maybe if you know an open source project that uses elixir with stripe could yo link it?
or just help me understand how to use the package?
Thank you
idi527
t = %t{}seems rather pointless to me since, for examplehere the intermediate value (from
%t{} = %User{}such thatt = User) is lost. If you want to pattern match on a user struct, it’s usually accomplished like thisTo better understand what goes wrong with
we would either need to see the implementation of
MyApiWeb.FallbackControlleror at least what’s intthat causes the “happy path” inwithto fail. Try thisNobbZ
I wasn’t in the need of a payment provider so far.
But please try to match only
{:ok, user}and then doIO.inspect user; conn.