Skip to content

Commit

Permalink
fix: 修复获取远程字段中发起请求如果出错但是不通知错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
gene9831 committed Feb 22, 2024
1 parent 2254730 commit 6df2ee8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/plugins/datasource/src/js/datasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ export const getRequest = (config) => {
}

const errorHandler = (error) => {
createFn(config.errorHandler.value)(error)
const reject = createFn(config.errorHandler.value)(error)
dataSource.status = 'error'
dataSource.error = error
return reject
}

http.interceptors.request.use(willFetch, errorHandler)
Expand Down

0 comments on commit 6df2ee8

Please sign in to comment.