Title: Wrong error type in httpclient doc · Issue #34748 · angular/angular · GitHub
Open Graph Title: Wrong error type in httpclient doc · Issue #34748 · angular/angular
X Title: Wrong error type in httpclient doc · Issue #34748 · angular/angular
Description: 📚 Docs or angular.io bug report Description A type was changed in a recent commit in angular which is not yet represented in the docs. What's the affected URL?** https://angular.io/guide/http#getting-error-details Reproduction Steps** In...
Open Graph Description: 📚 Docs or angular.io bug report Description A type was changed in a recent commit in angular which is not yet represented in the docs. What's the affected URL?** https://angular.io/guide/http#getti...
X Description: 📚 Docs or angular.io bug report Description A type was changed in a recent commit in angular which is not yet represented in the docs. What's the affected URL?** https://angular.io/guide/http#g...
Opengraph URL: https://github.com/angular/angular/issues/34748
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong error type in httpclient doc","articleBody":"# 📚 Docs or angular.io bug report\r\n\r\n### Description\r\nA type was changed in a recent commit in angular which is not yet represented in the docs.\r\n\r\n### What's the affected URL?**\r\nhttps://angular.io/guide/http#getting-error-details\r\n\r\n### Reproduction Steps**\r\nIn the code snippet app/config/config.service.ts there is this line:\r\n\r\n`if (error.error instanceof ErrorEvent) `\r\n\r\nIn case of a network error (or similar like a CORS error) the error property of the HttpErrorResponse is should be according to the docs an ErrorEvent. But in my tests always seems to be a ProgressEvent.\r\n\r\nIn this recent commit \r\nhttps://github.com/angular/angular/commit/0139b11227fdd93983a8c6bd870d579d798fa244#diff-26683cfb34fa97883213282055aef1e7\r\nin the file\r\npackages/common/http/src/xhr.ts\r\nthe type of the error property of the returned HttpErrorResponse was changed from ErrorEvent to ProgressEvent.\r\n\r\nUnfortunately unlike ErrorEvent the ProgressEvent has no message property. It is only usable as a indicator for a network error. The message property of the HttpErrorResponse itself has to be queried to retrieve a human readable error message.\r\n\r\nThe behaviour can be tested in\r\nhttps://stackblitz.com/edit/error-handling-httpclient?file=src%2Fapp%2Fuser.service.ts\r\n\r\nI am using Angular 8.2.14","author":{"url":"https://github.com/AlexNedo","@type":"Person","name":"AlexNedo"},"datePublished":"2020-01-12T19:31:29Z","url":"https://github.com/angular/angular/issues/34748"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1dccc568-1157-62b7-af34-37673d465723 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D512:ADA9D:1817018:1EF65F5:6B0130F9 |
| html-safe-nonce | 051e8862f7c6f3ad69e8d2425c5606c60b2a4a9cf9f404a2dab197e191c8cd8a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTEyOkFEQTlEOjE4MTcwMTg6MUVGNjVGNTo2QjAxMzBGOSIsInZpc2l0b3JfaWQiOiIzNTI1ODQ4ODA4MTA3ODgwNjk3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 181e4d429cf06e1b2cf67b9f2acea285c107aa7738c6abdbcddb54251e680a4c |
| hovercard-subject-tag | issue:548615703 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/34748/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d4043d5831a7b383f0e04bc8fc879ba5066b5d278d1053a6036049e8fef3438c/angular/angular/issues/34748 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d4043d5831a7b383f0e04bc8fc879ba5066b5d278d1053a6036049e8fef3438c/angular/angular/issues/34748 |
| og:image:alt | 📚 Docs or angular.io bug report Description A type was changed in a recent commit in angular which is not yet represented in the docs. What's the affected URL?** https://angular.io/guide/http#getti... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlexNedo |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width