<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="89245" data-post-id="89245">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="NobbZ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/NobbZ/120/27235_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  NobbZ
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="benonymus" data-post="9" data-topic="15272">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benonymus/48/31839_2.png" class="avatar"> benonymus:</div>
<blockquote>
<p>the fallback controller was auto generated</p>
</blockquote>
</aside>
<p>I have not yet seen this during my phoenix baby steps, are you using a 1.4 preview?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89245" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/functionclauseerror-why-i-am-getting-this-or-how-to-fix-it/15272/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-89245" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89245"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="89246" data-post-id="89246">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="benonymus" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benonymus/120/31839_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  benonymus
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The fallback controller looks like this:</p>
<pre><code>defmodule MyApiWeb.FallbackController do
  @moduledoc """
  Translates controller action results into valid `Plug.Conn` responses.

  See `Phoenix.Controller.action_fallback/1` for more details.
  """
  use MyApiWeb, :controller

  def call(conn, {:error, %Ecto.Changeset{} = changeset}) do
    conn
    |&gt; put_status(:unprocessable_entity)
    |&gt; render(MyApiWeb.ChangesetView, "error.json", changeset: changeset)
  end

  def call(conn, {:error, :not_found}) do
    conn
    |&gt; put_status(:not_found)
    |&gt; render(MyApiWeb.ErrorView, :"404")
  end
end
</code></pre>
<p>tried this {:ok, user} and i removed the fallback controller and then it gave a new error :</p>
<pre><code> (exit) an exception was raised:
    ** (Protocol.UndefinedError) protocol String.Chars not implemented for %Stripe.Customer{account_balance: 0, business_vat_id: nil, created: 1532261740, currency: nil, default_source: nil, delinquent: false, description: "Monthly subscription", discount: nil, email: "fs@as.com", id: "cus_DHExEBEuX9Jks8", invoice_prefix: "3AB85AC", livemode: false, metadata: %{}, object: "customer", shipping: nil, sources: %Stripe.List{data: [], has_more: false, object: "list", total_count: 0, url: "/v1/customers/cus_DHExEBEuX9Jks8/sources"}, subscriptions: %Stripe.List{data: [], has_more: false, object: "list", total_count: 0, url: "/v1/customers/cus_DHExEBEuX9Jks8/subscriptions"}}
</code></pre>
<p>as for using the preview, i just installed phoneix a few days ago so I am not aware of using preview version.</p>
<p>Also I tried what khm idiot suggested and with that for the first try it went throug nicely but for the second one got the stripe user printed out and got the same fallback error</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89246" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/functionclauseerror-why-i-am-getting-this-or-how-to-fix-it/15272/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-89246" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89246"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="89247" data-post-id="89247">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="idi527" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  idi527
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The original error says that no function head in <code>MyApiWeb.FallbackController</code> matches what’s returned from your <code>create</code> controller action. <code>MyApiWeb.FallbackController</code>, judging by your code snippet, can match either <code>{:error, %Ecto.Changeset{} = changeset}</code> or <code>{:error, :not_found}</code>, and nothing else. So if it receives, for example, <code>%Stripe.User{}</code>, it just doesn’t know what to do with it. You can add a new function which would match what’s returned from the <code>create</code> action and the error would disappear, but I doubt that’s what you actually want. I think the real problem is with the pattern in your <code>with</code> statement, <code>{:ok, %t{} = t}</code>.</p>
<blockquote>
<p>Also I tried what khm idiot suggested and with that for the first try it went throug nicely but for the second one got the stripe user printed out and got the same fallback error</p>
</blockquote>
<p><img src="https://forum.elixirforum.com/images/emoji/apple/+1.png?v=15" title=":+1:" class="emoji only-emoji" alt=":+1:" loading="lazy" width="20" height="20"></p>
<p>But printed out where? If you mean <code>IO.inspect</code>, then for which label, <code>unmatched</code>? If so, then that’s your solution right there – fix your pattern in <code>with</code> to match on a stripe user so that it doesn’t fail.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89247" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/functionclauseerror-why-i-am-getting-this-or-how-to-fix-it/15272/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-89247" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89247"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-solved cat-solved" title="Marked as solution"></div>
  </section>
</div>
    <div class="postbit" id="89254" data-post-id="89254">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="benonymus" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benonymus/120/31839_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  benonymus
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89254" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/functionclauseerror-why-i-am-getting-this-or-how-to-fix-it/15272/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-89254" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89254"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>