mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Improve error handling
This commit is contained in:
@@ -37,9 +37,9 @@
|
||||
output.className = 'container';
|
||||
output.innerHTML = res.data;
|
||||
})
|
||||
.catch(function (res) {
|
||||
.catch(function (err) {
|
||||
output.className = 'container text-danger';
|
||||
output.innerHTML = res.data;
|
||||
output.innerHTML = err.message;
|
||||
});
|
||||
};
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user