You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After logging, I found that error.value here is undefined.
The reason is that in execute function, _url is assigned a default '' (empty string) when it's undefined. Therefore, axios doesn't walk into the catch branch.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Describe the bug
In a word
Here's the original output of Vitest.
About the reason
After logging, I found that
error.value
here isundefined
.The reason is that in
execute
function,_url
is assigned a default''
(empty string) when it's undefined. Therefore,axios
doesn't walk into thecatch
branch.My solution
I'll open a PR later and mention it below.
Reproduction
Clone https://github.com/syy11cn/vueuse and run
pnpm run test
.System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: