配置request.interceptors.response.use后,errorHandler失效#53
Open
l745230 wants to merge 107 commits into
Open
Conversation
refactor: use umi-plugin-library to bundle
close #25
fix error type
doc: add doc vs axios and english readme.
send data for patch method
Send data for PATCH
Update index.d.ts
Add a parameter description for credentials in README.md file.
fix: index.d.ts 缺少 patch 方法定义
feat: Send data using delete
feat: use umi-lint
type support async
Co-authored-by: 温鑫 <xin.wen@baifendian.com>
* feat: add AbortController polyfill * doc: update cases; update types
|
包一层 函数 同意处理 Response,绕过报错: //包一层 处理返回 // 检测返回结果是否有错误 export default requestUmi; 使用: |
Co-authored-by: 夏柏阳 <xiabaiyang@bytedance.com>
因为 prefix 配置和 interceptor 内部都可以修改 url,而在后续的 interceptor 中难以将其还原。 在 options 中储存一下原始入参的 url 值,以便后续的 interceptor 读取。
* chore: switch build tool to father * chore: use father-build instead of father Co-authored-by: troy.lty <troy.lty@alipay.com>
* chore: remove abort controller polyfill * test: update test case and remove AbortController export * docs: update doc for abort controller
Co-authored-by: shiluo.dwt <shiluo.dwt@antgroup.com>
上传文件应当指定指定 requestType: 'form',文档示例缺少改部分代码
文件上传补充说明
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
测试发现未配置"5. For the status code is actually 200 errors," errorHandler能正常接收到404 500错误.

配置了request.interceptors.response.use后,errorHandler中error返回为underfind