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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>yes, look at:</p><aside class="onebox allowlistedgeneric" data-onebox-src="https://elixir-lang.org/getting-started/pattern-matching.html#pattern-matching-1">
  <header class="source">

      <a href="https://elixir-lang.org/getting-started/pattern-matching.html#pattern-matching-1" target="_blank" rel="noopener nofollow">elixir-lang.org</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://elixir-lang.org/getting-started/pattern-matching.html#pattern-matching-1" target="_blank" rel="noopener nofollow">Pattern matching — Elixir v1.20.2</a></h3>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<pre><code>iex(3)&gt; %{"enrollment" =&gt; enrollment_params} = %{"address" =&gt; "s", "city" =&gt; "s", "firstName" =&gt; "f", "lastName" =&gt; "s", "postalCode" =&gt; "s", "state" =&gt; "s"}
** (MatchError) no match of right hand side value:
</code></pre>
<p>so the clause in your create function doesn’t pattern match your params..</p>
<p>most likely you’ll want</p>
<p><code>def create(conn,  enrollment_params) do</code></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="72822" 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/angular5-post-request-to-phoenix-frramework-api-send-422-unprocessable-entity/12839/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-72822" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="72822"
                     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="72826" data-post-id="72826">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="odyright" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/odyright/120/4787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  odyright
                    <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><a class="mention" href="/u/outlog" rel="nofollow">@outlog</a> yes you right and i know that the create function mismatched the params… but the fact is that i’m pretty sure that correctly matched on my client-side code until proof to the contrary.<br>
and  <code>def create(conn, enrollment_params) do</code> will throw a 422 (unprocessable entity).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="72826" 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/angular5-post-request-to-phoenix-frramework-api-send-422-unprocessable-entity/12839/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-72826" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="72826"
                     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="72832" data-post-id="72832">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="odyright" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/odyright/120/4787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  odyright
                    <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>everything works now… it was due to a mismatched TYPO… on server side Repo migration in the database. that’s why i got <strong>422 (unprocessable entity)</strong></p>
<p>Thank you <span class="mention">@all</span> of 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="72832" 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/angular5-post-request-to-phoenix-frramework-api-send-422-unprocessable-entity/12839/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-72832" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="72832"
                     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>
</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>