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

Set TimeoutError#cause to be Request or URL #592

Closed
arty-name opened this issue Jun 19, 2024 · 2 comments · Fixed by #595
Closed

Set TimeoutError#cause to be Request or URL #592

arty-name opened this issue Jun 19, 2024 · 2 comments · Fixed by #595

Comments

@arty-name
Copy link
Contributor

TimeoutError now includes the Request as .request property.

JS errors also have a standard property .cause which is widely supported by various tooling. Would it make sense for TimeoutError to set this property in addition to (or even instead of) the .request? The value could be the whole Request or just its URL.

If not added into the core, this could be a use case for beforeTimeout hook.

@arty-name
Copy link
Contributor Author

Actually the whole Request seems to choke my tooling at least (Vite/Astro), so the URL could be a better option.

@arty-name
Copy link
Contributor Author

Thank you everyone for the quick solution! ❤️

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

Successfully merging a pull request may close this issue.

1 participant