<p dir="auto">Why does catch return an object and not an error object?</p>
<p dir="auto">It is good practice to reject promises with an error object because they have stack traces.</p>
<p dir="auto"><a href="https://github.com/mzabriskie/axios/blob/d93df704a269d3cbf8f00bcd4b2b2489d5b74f49/lib/adapters/http.js#L73">When rejecting because of a bad status code</a>, I suggest rejecting with an error object, e.g. <code class="notranslate">BadStatusCodeError</code>. You could then attach the response object to the error object so it can be accessed in a rejection handler.</p>