<div dir="ltr">ah, the "beauty" of javascript ;)<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 11, 2017 at 4:13 PM, Summers Pittman <span dir="ltr"><<a href="mailto:supittma@redhat.com" target="_blank">supittma@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Jan 11, 2017 at 10:39 AM, Wei Li <span dir="ltr"><<a href="mailto:weil@redhat.com" target="_blank">weil@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is it possible that err.code is "0" (string type), rather than 0 (number type)?</div><div class="gmail_extra"><div><div class="m_2702776992449608006h5"><br></div></div></div></blockquote><div><br></div></span><div>That seems to be it.</div><span class=""><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div><div class="m_2702776992449608006h5"><div class="gmail_quote">On Wed, Jan 11, 2017 at 3:36 PM, Paolo Haji <span dir="ltr"><<a href="mailto:phaji@redhat.com" target="_blank">phaji@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It's definitely weird that the stack trace points to that line since (0 || 500) === 500</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_2702776992449608006m_7789849177061144396h5">On Wed, Jan 11, 2017 at 1:26 PM, Summers Pittman <span dir="ltr"><<a href="mailto:supittma@redhat.com" target="_blank">supittma@redhat.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_2702776992449608006m_7789849177061144396h5"><div dir="ltr">Hey guys,<div><br></div><div>While I was debugging this stack trace [<a href="https://gist.github.com/secondsun/16088b4212394140b9053a448d7faf63" target="_blank">https://gist.github.com/secon<wbr>dsun/16088b4212394140b9053a448<wbr>d7faf63</a>] in Raincatcher I came across this area of code : <a href="https://github.com/feedhenry/fh-mbaas-express/blob/master/lib/mbaas.js#L156" target="_blank">https://github.com/feedhenry<wbr>/fh-mbaas-express/blob/master/<wbr>lib/mbaas.js#L156</a></div><div><br></div><div>It looks like when request can't connect to a service, err.code is set to 0.  Since 0 isn't a valid status code the library will crash the application instead of properly returning an error to the application.  </div><div><br></div><div>I tried doing a check for (err.code === 0) and setting values differently, but this block doesn't execute and the error persists.</div><div><br></div><div>What should the correct way to handle this situation be?</div><span class="m_2702776992449608006m_7789849177061144396m_-8918121316400516915HOEnZb"><font color="#888888"><div><br></div><div>Summers</div><div><br></div><div><br></div></font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
feedhenry-dev mailing list<br>
<a href="mailto:feedhenry-dev@redhat.com" target="_blank">feedhenry-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/feedhenry-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/feedhenry-dev</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
feedhenry-dev mailing list<br>
<a href="mailto:feedhenry-dev@redhat.com" target="_blank">feedhenry-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/feedhenry-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/feedhenry-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_2702776992449608006HOEnZb"><font color="#888888">-- <br><div class="m_2702776992449608006m_7789849177061144396gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Wei Li<br>Red Hat email address: <a href="mailto:wei.li@redhat.com" target="_blank">wei.li@redhat.com</a><br>Senior Software Engineer</div></div>
</font></span></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Wei Li<br>Red Hat email address: <a href="mailto:wei.li@redhat.com" target="_blank">wei.li@redhat.com</a><br>Senior Software Engineer</div></div>
</div></div>