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

Provide detail for async functions on error_events page #38318

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

shafiqihtsham
Copy link
Contributor

Description

This PR adds a warning to show users that asynchronous functions do not throw an error event rather a unhandled rejection event.

Motivation

Asynchronous functions always return a promise so it is important to understand what errors are thrown compared to a synchronous function.

Additional details

Related issues and pull requests

Fixes #38246

@shafiqihtsham shafiqihtsham requested a review from a team as a code owner February 25, 2025 10:22
@shafiqihtsham shafiqihtsham requested review from sideshowbarker and removed request for a team February 25, 2025 10:22
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Feb 25, 2025
Copy link
Contributor

github-actions bot commented Feb 25, 2025

Preview URLs

(comment last updated: 2025-02-25 17:10:23)

Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks

@github-actions github-actions bot added size/xs [PR only] 0-5 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Feb 25, 2025
@Josh-Cena Josh-Cena merged commit 19185ae into mdn:main Feb 25, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The page on the error event should explain that errors in promises trigger an unhandledrejection event instead
2 participants