Why do fetch errors not have a stacktrace in my single page application?
问题 I have two simple wrappers that handle requests in my single page application. One wraps fetch and throws an error if a response is not ok (not in the 200-300 range): const fetchy = (...args) => fetch(...args).then(response => { if (response.ok) { return response } throw new Error(response.statusText) }) export default fetchy And one wraps fetchy and is used for GET requests: const get = endpoint => { const headers = new Headers({ Authorization: `Bearer ${TOKEN}` }) const init = { method: