前者在`catch(error)`后抛出了`error.response.data`而丢弃了其它信息,而后者要访问`error.response.status`。这导致总是提示默认的`内部服务器错误`,而不是具体错误
前者在
catch(error)后抛出了error.response.data而丢弃了其它信息,而后者要访问error.response.status。这导致总是提示默认的内部服务器错误,而不是具体错误