> <font><span style="background-color:rgba(255,255,255,0)">If the `await` function is wrapped in a `catch`, then the message won't be handled properly.</span></font><div><font><span style><br></span></font></div><div>We have actually discussed this extensively. We have decided to not handle those cases because similar errors happen if you wrap a gen_server:call/3 in a catch. If you trigger the call timeout and catch it, the gen server is going to eventually reply which will sit in your inbox. We believe there is one httpc bug caused due to this (anti-)pattern.</div><div><br></div><div>(insert huge misplaced rant about catch)</div><div><br></div><div>So we could either use middleman processes for everything or document a task is another process and catching can lead to idle messages regardless of trap exits. We went with the latt<span></span>er.</div><div><br></div><div>I do agree with Fred this is trickier than it looks though, even more if you are using lager and want nicely formatted error messages (then you need to use proc_lib and what not).</div><div><br></div><div><br></div><br><br>-- <br><div><br></div><div><br></div><div><span style="font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Skype: jv.ptec</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></div><br>