am-freescan/am-web/src/config/axios/requestFailure.mjs
lixiaolong cfff7295a6 feat(scanner): integrate scanner workflows and real-time preview
Add scanner API integration, workflow components, execution-bound live images and 3D model viewing. Harden task control, parameters, resource protection and reports, with automated regressions and detailed verification records.
2026-10-23 09:03:27 +08:00

9 lines
347 B
JavaScript

import axios from 'axios'
// Navigation and polling deliberately abort obsolete requests. Keep rejection
// semantics for the caller, while reserving notifications for real failures.
export function rejectRequestFailure(error, notify) {
if (!axios.isCancel(error) && error?.name !== 'AbortError') notify(error)
return Promise.reject(error)
}