René's URL Explorer Experiment


Title: fix(common): incorrect error type for XHR errors in `TestRequest` by devversion · Pull Request #36082 · angular/angular · GitHub

Open Graph Title: fix(common): incorrect error type for XHR errors in `TestRequest` by devversion · Pull Request #36082 · angular/angular

X Title: fix(common): incorrect error type for XHR errors in `TestRequest` by devversion · Pull Request #36082 · angular/angular

Description: Currently the HttpClient always wraps errors from XHR requests, but the underlying errors are always of type ProgressEvent, or don't have a native error if the status code is just indicating failure (e.g. 404). This behavior does not match in the TestRequest class provided by @angular/common/http/testing where errors are considered being of type ErrorEvent. This is incorrect because ErrorEvents provide information for errors in scripts or files which are evaluated. Since the HttpClient never evaluates scripts/files, and also since XHR requests clearly are documented to emit ProgressEvent's, we should change the TestSupport to retrieve such ProgressEvent's instead of incompatible objects of type ErrorEvent. Resources: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/error_event https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent https://xhr.spec.whatwg.org/#event-xhr-errpr Related to: #34748.

Open Graph Description: Currently the HttpClient always wraps errors from XHR requests, but the underlying errors are always of type ProgressEvent, or don't have a native error if the status code is just indicating fa...

X Description: Currently the HttpClient always wraps errors from XHR requests, but the underlying errors are always of type ProgressEvent, or don't have a native error if the status code is just indicatin...

Opengraph URL: https://github.com/angular/angular/pull/36082

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:616f129e-d2fe-26ad-fe34-6685a21b5339
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEC56:240CD1:15753E9:1B4B9B2:6B01314C
html-safe-noncedb50f9aa74bf63af05bd7a5211e3a64517a1752a435183ca6f5fe79cd5d43ac0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzU2OjI0MENEMToxNTc1M0U5OjFCNEI5QjI6NkIwMTMxNEMiLCJ2aXNpdG9yX2lkIjoiMzE4ODU4NDkwNzc1NjYxMzk2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac280728a1411f05c600dbdb7a13806d128abdb6bc169818486d7187fc2b816a60
hovercard-subject-tagpull_request:389162758
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/angular/angular/pull/36082/files
twitter:imagehttps://avatars.githubusercontent.com/u/4987015?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4987015?s=400&v=4
og:image:altCurrently the HttpClient always wraps errors from XHR requests, but the underlying errors are always of type ProgressEvent, or don't have a native error if the status code is just indicating fa...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular/pull/36082/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fpull%2F36082%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fpull%2F36082%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/pull/36082/files
Reloadhttps://github.com/angular/angular/pull/36082/files
Reloadhttps://github.com/angular/angular/pull/36082/files
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues836 (836)https://github.com/angular/angular/issues
Pull requests141 (141)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fangular%2Fangular%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fangular%2Fangular%2Fissues%2Fnew%2Fchoose
devversionhttps://github.com/devversion
angular:masterhttps://github.com/angular/angular/tree/master
devversion:fix/common-http-testing-type-error-event-properlyhttps://github.com/devversion/angular/tree/fix/common-http-testing-type-error-event-properly
Conversation 40 https://github.com/angular/angular/pull/36082
Commits 1 https://github.com/angular/angular/pull/36082/commits
Checks 0 https://github.com/angular/angular/pull/36082/checks
Files changed https://github.com/angular/angular/pull/36082/files
Please reload this pagehttps://github.com/angular/angular/pull/36082/files
fix(common): incorrect error type for XHR errors in TestRequest https://github.com/angular/angular/pull/36082/files#top
Show all changes 1 commit https://github.com/angular/angular/pull/36082/files
9598e7c fix(common): incorrect error type for XHR errors in `TestRequest` devversion Jun 22, 2020 https://github.com/angular/angular/pull/36082/commits/9598e7cc5454ab83d5a2d15c190811263a33a749
Clear filters https://github.com/angular/angular/pull/36082/files
Please reload this pagehttps://github.com/angular/angular/pull/36082/files
Please reload this pagehttps://github.com/angular/angular/pull/36082/files
http-client.spec.ts https://github.com/angular/angular/pull/36082/files#diff-76243ab8f8cf8ab1ce60316791356fe9acc859be5da95759368aed0243b486a5
hero.service.spec.ts https://github.com/angular/angular/pull/36082/files#diff-a83b2b0faa0eb3174d218522153daf69f8d0d136cbb0395a9184f38c0e8a36cb
hero.service.ts https://github.com/angular/angular/pull/36082/files#diff-cdc0785cf913303c21cd89e8b59f2fedcff99188c2e0d44318be107ee49fd729
http-client.spec.ts https://github.com/angular/angular/pull/36082/files#diff-7c991dd660276ce199e32f0ae479a304856ec6ede102fa20b4412f5923b842c2
deprecations.md https://github.com/angular/angular/pull/36082/files#diff-4ff19c968abd0983250c5a2a7ccf1c261b2a29a012da89844d06fd5b186ef144
testing.md https://github.com/angular/angular/pull/36082/files#diff-b9eacc51b59daca96beb4e1b6ff38b45ad6d5e69e45a873d46fb8f81372dd6a9
xhr_mock.ts https://github.com/angular/angular/pull/36082/files#diff-90fed3cada4f0739d190bb34d8df617cc5f92c80985e281e33c9e38a299bb09c
request.ts https://github.com/angular/angular/pull/36082/files#diff-f8d7ebfeadcab8c7558a8c7f8ed8c90007b5b306a2d8e8fd87b261f5ddbb3d6d
aio/content/examples/http/src/testing/http-client.spec.tshttps://github.com/angular/angular/pull/36082/files#diff-76243ab8f8cf8ab1ce60316791356fe9acc859be5da95759368aed0243b486a5
View file https://github.com/devversion/angular/blob/9598e7cc5454ab83d5a2d15c190811263a33a749/aio/content/examples/http/src/testing/http-client.spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/36082/{{ revealButtonHref }}
https://github.com/angular/angular/pull/36082/files#diff-76243ab8f8cf8ab1ce60316791356fe9acc859be5da95759368aed0243b486a5
Please reload this pagehttps://github.com/angular/angular/pull/36082/files
https://github.com/angular/angular/pull/36082/files#diff-76243ab8f8cf8ab1ce60316791356fe9acc859be5da95759368aed0243b486a5
aio/content/examples/testing/src/app/model/hero.service.spec.tshttps://github.com/angular/angular/pull/36082/files#diff-a83b2b0faa0eb3174d218522153daf69f8d0d136cbb0395a9184f38c0e8a36cb
View file https://github.com/devversion/angular/blob/9598e7cc5454ab83d5a2d15c190811263a33a749/aio/content/examples/testing/src/app/model/hero.service.spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/36082/{{ revealButtonHref }}
https://github.com/angular/angular/pull/36082/files#diff-a83b2b0faa0eb3174d218522153daf69f8d0d136cbb0395a9184f38c0e8a36cb
https://github.com/angular/angular/pull/36082/files#diff-a83b2b0faa0eb3174d218522153daf69f8d0d136cbb0395a9184f38c0e8a36cb
aio/content/examples/testing/src/app/model/hero.service.tshttps://github.com/angular/angular/pull/36082/files#diff-cdc0785cf913303c21cd89e8b59f2fedcff99188c2e0d44318be107ee49fd729
View file https://github.com/devversion/angular/blob/9598e7cc5454ab83d5a2d15c190811263a33a749/aio/content/examples/testing/src/app/model/hero.service.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/36082/{{ revealButtonHref }}
https://github.com/angular/angular/pull/36082/files#diff-cdc0785cf913303c21cd89e8b59f2fedcff99188c2e0d44318be107ee49fd729
https://github.com/angular/angular/pull/36082/files#diff-cdc0785cf913303c21cd89e8b59f2fedcff99188c2e0d44318be107ee49fd729
aio/content/examples/testing/src/app/model/testing/http-client.spec.tshttps://github.com/angular/angular/pull/36082/files#diff-7c991dd660276ce199e32f0ae479a304856ec6ede102fa20b4412f5923b842c2
View file https://github.com/devversion/angular/blob/9598e7cc5454ab83d5a2d15c190811263a33a749/aio/content/examples/testing/src/app/model/testing/http-client.spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/36082/{{ revealButtonHref }}
https://github.com/angular/angular/pull/36082/files#diff-7c991dd660276ce199e32f0ae479a304856ec6ede102fa20b4412f5923b842c2
https://github.com/angular/angular/pull/36082/files#diff-7c991dd660276ce199e32f0ae479a304856ec6ede102fa20b4412f5923b842c2
aio/content/guide/deprecations.mdhttps://github.com/angular/angular/pull/36082/files#diff-4ff19c968abd0983250c5a2a7ccf1c261b2a29a012da89844d06fd5b186ef144
View file https://github.com/devversion/angular/blob/9598e7cc5454ab83d5a2d15c190811263a33a749/aio/content/guide/deprecations.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/36082/{{ revealButtonHref }}
https://github.com/angular/angular/pull/36082/files#diff-4ff19c968abd0983250c5a2a7ccf1c261b2a29a012da89844d06fd5b186ef144
https://github.com/angular/angular/pull/36082/files#diff-4ff19c968abd0983250c5a2a7ccf1c261b2a29a012da89844d06fd5b186ef144
https://github.com/angular/angular/pull/36082/files#diff-4ff19c968abd0983250c5a2a7ccf1c261b2a29a012da89844d06fd5b186ef144
jelbournhttps://github.com/jelbourn
Jun 24, 2020https://github.com/angular/angular/pull/36082/files#r445059705
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/angular/angular/pull/36082/files
https://github.com/angular/angular/pull/36082/files#diff-4ff19c968abd0983250c5a2a7ccf1c261b2a29a012da89844d06fd5b186ef144
goldens/public-api/common/http/testing/testing.mdhttps://github.com/angular/angular/pull/36082/files#diff-b9eacc51b59daca96beb4e1b6ff38b45ad6d5e69e45a873d46fb8f81372dd6a9
View file https://github.com/devversion/angular/blob/9598e7cc5454ab83d5a2d15c190811263a33a749/goldens/public-api/common/http/testing/testing.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/36082/{{ revealButtonHref }}
https://github.com/angular/angular/pull/36082/files#diff-b9eacc51b59daca96beb4e1b6ff38b45ad6d5e69e45a873d46fb8f81372dd6a9
https://github.com/angular/angular/pull/36082/files#diff-b9eacc51b59daca96beb4e1b6ff38b45ad6d5e69e45a873d46fb8f81372dd6a9
packages/common/http/test/xhr_mock.tshttps://github.com/angular/angular/pull/36082/files#diff-90fed3cada4f0739d190bb34d8df617cc5f92c80985e281e33c9e38a299bb09c
View file https://github.com/devversion/angular/blob/9598e7cc5454ab83d5a2d15c190811263a33a749/packages/common/http/test/xhr_mock.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/36082/{{ revealButtonHref }}
https://github.com/angular/angular/pull/36082/files#diff-90fed3cada4f0739d190bb34d8df617cc5f92c80985e281e33c9e38a299bb09c
https://github.com/angular/angular/pull/36082/files#diff-90fed3cada4f0739d190bb34d8df617cc5f92c80985e281e33c9e38a299bb09c
packages/common/http/testing/src/request.tshttps://github.com/angular/angular/pull/36082/files#diff-f8d7ebfeadcab8c7558a8c7f8ed8c90007b5b306a2d8e8fd87b261f5ddbb3d6d
View file https://github.com/devversion/angular/blob/9598e7cc5454ab83d5a2d15c190811263a33a749/packages/common/http/testing/src/request.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/36082/{{ revealButtonHref }}
https://github.com/angular/angular/pull/36082/files#diff-f8d7ebfeadcab8c7558a8c7f8ed8c90007b5b306a2d8e8fd87b261f5ddbb3d6d
https://github.com/angular/angular/pull/36082/files#diff-f8d7ebfeadcab8c7558a8c7f8ed8c90007b5b306a2d8e8fd87b261f5ddbb3d6d
https://github.com/angular/angular/pull/36082/files#diff-f8d7ebfeadcab8c7558a8c7f8ed8c90007b5b306a2d8e8fd87b261f5ddbb3d6d
https://github.com/angular/angular/pull/36082/files#diff-f8d7ebfeadcab8c7558a8c7f8ed8c90007b5b306a2d8e8fd87b261f5ddbb3d6d
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.