Skip to content

Commit

Permalink
feat: 修正错误处理示例
Browse files Browse the repository at this point in the history
  • Loading branch information
zjxxxxxxxxx committed Apr 27, 2023
1 parent f23d270 commit 01c8b5c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/pages/basics/error-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ axios('https://api.com/test')
} else {
// 其他错误
}

return Promise.reject(error);
});
```

Expand Down Expand Up @@ -106,6 +108,8 @@ axios('https://api.com/test', {
} else {
// 其他错误
}

return Promise.reject(error);
},
})
.then((response) => {
Expand Down Expand Up @@ -152,5 +156,7 @@ axios.defaults.errorHandler = (error) => {
} else {
// 其他错误
}

return Promise.reject(error);
};
```

0 comments on commit 01c8b5c

Please sign in to comment.