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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="jola" data-post="10" data-topic="21560">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jola/48/18010_2.png" class="avatar"> jola:</div>
<blockquote>
<p>That can’t be right, I’m returning maps from my render functions and I get JSON. I couldn’t tell you why though, is it inferred from the view name?</p>
</blockquote>
</aside>
<p>Not the view name but rather what ‘higher up’ in the callstack is calling your render function.  In a base error rendrerer there’s very little above it and I’m not sure if the content-type requested by the client is followed or not (since it’s an error and the body shouldn’t be used for data anyway).</p>
<p>You can always return the stacktrace in that function and see what it’s going through, there might be an option?  <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<blockquote>
<p>Edit: Googled a bit and the Phoenix View documentation shows rendering JSON from a map in an example. So it should work.</p>
</blockquote>
<p>That’s for rendering from controllers, not errors though, I’m unsure about error handling.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="123939" data-batch-url="/posts/batch_likers">
                        2
                      </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/different-error-on-dev-and-production/21560/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-123939" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="123939"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="123940" data-post-id="123940">
  <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>Yes, the problem was that the production didn’t return the correct code either</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="123940" data-batch-url="/posts/batch_likers">
                        1
                      </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/different-error-on-dev-and-production/21560/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-123940" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="123940"
                     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="123943" data-post-id="123943">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m curious what the content-type is of the response then.</p>
<p><a class="mention" href="/u/overminddl1" rel="nofollow">@OvermindDL1</a> as far as I can tell, the error view is set as a config option on the endpoint (<code>render_errors</code>) where you can specify a list of content types. Generating a fresh phoenix app with no HTML gives you an error view that has this comment</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  # If you want to customize a particular status code
  # for a certain format, you may uncomment below.
  # def render("500.json", _assigns) do
  #   %{errors: %{detail: "Internal Server Error"}}
  # end
</code></pre>
<p>so I see no reason why returning maps wouldn’t work here either.</p>
<p>In fact, <a class="mention" href="/u/benonymus" rel="nofollow">@benonymus</a>, I’m curious what your <code>render_errors</code> config option looks like in <code>config/config.exs</code>, <code>config/dev.exs</code> and <code>config/prod.exs</code>. Maybe you’ve put JSON in one and HTML in another? It should look something like this</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">render_errors: [view: HelloWeb.ErrorView, accepts: ~w(json)],
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="123943" data-batch-url="/posts/batch_likers">
                        2
                      </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/different-error-on-dev-and-production/21560/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-123943" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="123943"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="123944" data-post-id="123944">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="jola" data-post="14" data-topic="21560">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jola/48/18010_2.png" class="avatar"> jola:</div>
<blockquote>
<p>so I see no reason why returning maps wouldn’t work here either.</p>
</blockquote>
</aside>
<p>Hmm, good question then.  Is there a test for this in the phoenix testsuite?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="123944" 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/different-error-on-dev-and-production/21560/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-123944" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="123944"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="123946" data-post-id="123946">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>In fact, I can reproduce <a class="mention" href="/u/benonymus" rel="nofollow">@benonymus</a>’s error by specifying <code>html</code> in my <code>render_errors</code>.</p>
<p>So in my <code>config/config.exs</code> I replaced</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">render_errors: [view: HelloWeb.ErrorView, accepts: ~w(json)],
</code></pre>
<p>with</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">render_errors: [view: HelloWeb.ErrorView, accepts: ~w(html)],
</code></pre>
<p>I get</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[error] #PID&lt;0.603.0&gt; running HelloWeb.Endpoint (connection #PID&lt;0.602.0&gt;, stream id 1) terminated
Server: localhost:4000 (http)
Request: POST /nowhere
** (exit) an exception was raised:
    ** (UndefinedFunctionError) function Phoenix.HTML.Safe.to_iodata/1 is undefined (module Phoenix.HTML.Safe is not available)
        Phoenix.HTML.Safe.to_iodata(%{errors: %{detail: "Not Found"}})
        (phoenix) lib/phoenix/controller.ex:729: Phoenix.Controller.__put_render__/5
        (hello) lib/hello_web/endpoint.ex:1: HelloWeb.Endpoint.instrument/4
        (phoenix) lib/phoenix/endpoint/render_errors.ex:75: Phoenix.Endpoint.RenderErrors.instrument_render_and_send/5
        (phoenix) lib/phoenix/endpoint/render_errors.ex:62: Phoenix.Endpoint.RenderErrors.__catch__/5
        (phoenix) lib/phoenix/endpoint/cowboy2_handler.ex:33: Phoenix.Endpoint.Cowboy2Handler.init/2
        (cowboy) /Users/johanna/workspace/hello/deps/cowboy/src/cowboy_handler.erl:41: :cowboy_handler.execute/2
        (cowboy) /Users/johanna/workspace/hello/deps/cowboy/src/cowboy_stream_h.erl:296: :cowboy_stream_h.execute/3
        (cowboy) /Users/johanna/workspace/hello/deps/cowboy/src/cowboy_stream_h.erl:274: :cowboy_stream_h.request_process/3
        (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="123946" data-batch-url="/posts/batch_likers">
                        1
                      </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/different-error-on-dev-and-production/21560/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-123946" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="123946"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="123948" data-post-id="123948">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="axelson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/axelson/120/26351_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  axelson
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Scenic Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hmmm, I wonder if that error message could be improved to guide users to the correct fix for their needs. At the very least I believe we can say that when only <code>html</code> is specified in <code>render_errors</code> that only an iolist or binary are valid inputs and other inputs should result in an error message.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="123948" data-batch-url="/posts/batch_likers">
                        3
                      </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/different-error-on-dev-and-production/21560/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-123948" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="123948"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="123975" data-post-id="123975">
  <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><code>render_errors: [view: DotooEndpoint.ErrorView, accepts: ~w(html json)]</code></p>
<p>I have both, this is an umbrella application and we have a endpoint project that acts as a gateway.<br>
also as you can see from my earlier comment</p>
<aside class="quote no-group quote-modified" data-username="benonymus" data-post="6" data-topic="21560">
<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>private: %{ phoenix_endpoint: XD.Endpoint, phoenix_format: “html”, phoenix_layout: false, phoenix_template: “413.html”, phoenix_view: XD.ErrorView },</p>
</blockquote>
</aside>
<aside class="quote no-group quote-modified" data-username="benonymus" data-post="6" data-topic="21560">
<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>view_template: “413.html”</p>
</blockquote>
</aside>
<p>it is by default looking for 413.html but until now i only had .json error_views.</p>
<p>and even if I pass the json error to it manually I am getting the same error as you reproduced</p>
<p>the difference that I can see between the dev and production envs is that the dev has debug_errors shown while the production doesn’t</p>
<p>also even if i return json the reponse still stays html, postman cannot beautify it</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="123975" 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/different-error-on-dev-and-production/21560/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-123975" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="123975"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="211487" data-post-id="211487">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/benonymus" rel="nofollow">@benonymus</a> have you ever managed to resolve that? It looks like I stumbled upon the same issue here.</p><aside class="quote quote-modified" data-post="13" data-topic="39071">
  <div class="title">
    <div class="quote-controls"></div>
    <img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hubertlepicki/48/6822_2.png" class="avatar">
    <div class="quote-title__text-content">
      <a href="https://forum.elixirforum.com/t/cowboy-handlers-proably-exit-not-being-logged-or-reported-anywhere/39071/13" rel="nofollow">Cowboy handlers proably exit, not being logged or reported anywhere</a> <a class="badge-category__wrapper " href="/c/questions-help/questions/53" rel="nofollow"><span data-category-id="53" style="--category-badge-color: #C14BFB; --category-badge-text-color: #000000; --parent-category-badge-color: #C14BFB;" data-parent-category-id="171" data-drop-close="true" class="badge-category --style-square --has-parent" title="Elixir Questions / Help"><span class="badge-category__name">Questions</span></span></a>
    </div>
  </div>
  <blockquote>
    Sort of. Not fully. 
So I have installed monitor on the cowboy processes that handle requests so I learn about their exit reasons. I caught this thing: 
%Plug.Parsers.RequestTooLargeError{..}

Which doesn’t appear anywhere else in my logs or caught exceptions.  It looks like some requests coming in are exceeding default 8MB of payload sizez, which triggers this error. 
Now this is not really a kill reason I at all but this exception. I can replicate this reliabily against my app with: 
curl --da…
  </blockquote>
</aside>

<p>Which I initially missinterpreted as Cowboy processes performing exit() but now I am thinking this is not the case.</p>
<p>This error gets swallowed on prod, and is only logged if level is set to debug. My installed exception catchers don’t catch it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="211487" 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/different-error-on-dev-and-production/21560/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-211487" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="211487"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="211501" data-post-id="211501">
  <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>Hey,</p>
<p>Not really, I created a 413.html error function in the error_view, and the client only uses the error code.<br>
It was more of a work around.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="211501" data-batch-url="/posts/batch_likers">
                        1
                      </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/different-error-on-dev-and-production/21560/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-211501" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="211501"
                     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 #19"></div>
  </section>
</div>
    <div class="postbit" id="230542" data-post-id="230542">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I was able to discover a solution on StackOverflow which seems to solve the problem of the OP.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">6

In your MyAppWeb.Endpoint file you should have something like this to configure the parser:

plug Plug.Parsers,
  parsers: [:urlencoded, :multipart, :json],
  pass: ["*/*"],
  json_decoder: Poison
Change parsers to:

  parsers: [:urlencoded, 
           {:multipart, length: 20_000_000},
            :json]
  query_string_length: 1_000_000,
</code></pre>
<p><a href="https://stackoverflow.com/questions/49230116/413-request-entity-too-large-elixir-plug" rel="noopener nofollow ugc">https://stackoverflow.com/questions/49230116/413-request-entity-too-large-elixir-plug</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="230542" 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/different-error-on-dev-and-production/21560/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-230542" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="230542"
                     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>