Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

需要对/node_modules/axios/lib/adapters/http.js的promise加个catch #14

Open
AndrewHann opened this issue Feb 21, 2023 · 6 comments
Open

Comments

@AndrewHann
Copy link

解析视频时报错
(node:11901) UnhandledPromiseRejectionWarning: Error: Request failed with status code 403
at createError (/home/pi/TiktokWeb/web/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/pi/TiktokWeb/web/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/home/pi/TiktokWeb/web/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:11901) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)

@michael2221807
Copy link

一样的问题,请问老哥你解决了吗?

@AndrewHann
Copy link
Author

一样的问题,请问老哥你解决了吗?

解决方式我已经写在标题上了呀,直接对这个promise加个catch就可以了

@lazyou
Copy link

lazyou commented Feb 27, 2023

为什么会产生403?是cookie无效吗,我不少视频都无法解析

@AndrewHann
Copy link
Author

我也会这样 多试几次就行了

Repository owner deleted a comment from zuimengxinbie Mar 15, 2023
@18639522576
Copy link

加上catch 也是解析不了 是不是失效了

Johnserf-Seed added a commit that referenced this issue Apr 9, 2023
Johnserf-Seed added a commit that referenced this issue Sep 3, 2023
1、让路由文件更加简洁
2、错误处理中间件
Johnserf-Seed added a commit that referenced this issue Sep 3, 2023
@Johnserf-Seed
Copy link
Owner

使用新镜像即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants