René's URL Explorer Experiment


Title: Handle invalid JSON responses like .NET clients by Copilot · Pull Request #80 · FacilityApi/FacilityJavaScript · GitHub

Open Graph Title: Handle invalid JSON responses like .NET clients by Copilot · Pull Request #80 · FacilityApi/FacilityJavaScript

X Title: Handle invalid JSON responses like .NET clients by Copilot · Pull Request #80 · FacilityApi/FacilityJavaScript

Description: JSON parse failures in the JS client currently reject the fetch pipeline instead of surfacing a service error. This aligns the JS behavior with the .NET implementation by treating malformed JSON as an invalid response and preserving normal HTTP-status-based error mapping. Behavior change Catch response.json() failures in HttpClientUtility.fetchResponse. Preserve HTTP-status-based handling for error responses when deserialization fails. Surface malformed JSON on successful responses as an InvalidResponse service error instead of falling back to a generic unexpected-status message. Error mapping Successful statuses with malformed JSON now resolve to InvalidResponse. Successful malformed JSON responses now report an invalid-content message that includes the JSON parse error detail. Failure statuses with malformed JSON continue to map from the HTTP status code rather than failing with a thrown parse error. Coverage Add focused tests for malformed JSON on both success and failure responses. Keep the existing parsed-JSON path covered to confirm normal behavior is unchanged. Remove unused Chai should() setup from the focused malformed-JSON test. return jsonPromise .then((json) => ({ response, json, })) .catch((error) => response.status >= 400 && response.status <= 599 ? { response } : { response, json: { code: 'InvalidResponse', message: `HTTP content is invalid: ${error.message}`, }, } );

Open Graph Description: JSON parse failures in the JS client currently reject the fetch pipeline instead of surfacing a service error. This aligns the JS behavior with the .NET implementation by treating malformed JSON as...

X Description: JSON parse failures in the JS client currently reject the fetch pipeline instead of surfacing a service error. This aligns the JS behavior with the .NET implementation by treating malformed JSON as...

Opengraph URL: https://github.com/FacilityApi/FacilityJavaScript/pull/80

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:cf4c747f-bc3a-20bd-d180-1da5024539e7
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id801C:305B07:3339D8:45777C:6B00C532
html-safe-nonceb1136e1ca3ed383d9b2c8459e159be589c1aa4cb2420ea0f09ab208cc4479e97
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDFDOjMwNUIwNzozMzM5RDg6NDU3NzdDOjZCMDBDNTMyIiwidmlzaXRvcl9pZCI6IjIyNDYxMjc4OTg4NDkyMzIxNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc8c73385d858a729472d190299a90499f61fd1d74d725e45d8084a574aa5cc10
hovercard-subject-tagpull_request:3770586416
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/FacilityApi/FacilityJavaScript/pull/80/files
twitter:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
og:image:altJSON parse failures in the JS client currently reject the fetch pipeline instead of surfacing a service error. This aligns the JS behavior with the .NET implementation by treating malformed JSON as...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None93edd3bebc4afb7ce711ee74cb5d2a95927850b082a4d43e212222389cb1c415
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/FacilityApi/FacilityJavaScript git https://github.com/FacilityApi/FacilityJavaScript.git
octolytics-dimension-user_id22828021
octolytics-dimension-user_loginFacilityApi
octolytics-dimension-repository_id73533359
octolytics-dimension-repository_nwoFacilityApi/FacilityJavaScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id73533359
octolytics-dimension-repository_network_root_nwoFacilityApi/FacilityJavaScript
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
release1fee81a280ea86312b69448e261b418189bfd5b5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/FacilityApi/FacilityJavaScript/pull/80/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FFacilityApi%2FFacilityJavaScript%2Fpull%2F80%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%2FFacilityApi%2FFacilityJavaScript%2Fpull%2F80%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=FacilityApi%2FFacilityJavaScript
Reloadhttps://github.com/FacilityApi/FacilityJavaScript/pull/80/files
Reloadhttps://github.com/FacilityApi/FacilityJavaScript/pull/80/files
Reloadhttps://github.com/FacilityApi/FacilityJavaScript/pull/80/files
FacilityApihttps://github.com/FacilityApi
FacilityJavaScripthttps://github.com/FacilityApi/FacilityJavaScript
Codehttps://github.com/FacilityApi/FacilityJavaScript
Issues6 (6)https://github.com/FacilityApi/FacilityJavaScript/issues
Pull requests6 (6)https://github.com/FacilityApi/FacilityJavaScript/pulls
Actionshttps://github.com/FacilityApi/FacilityJavaScript/actions
Security and qualityhttps://github.com/FacilityApi/FacilityJavaScript/security
Insightshttps://github.com/FacilityApi/FacilityJavaScript/insights
Sign up for GitHub https://github.com/signup?return_to=%2FFacilityApi%2FFacilityJavaScript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FFacilityApi%2FFacilityJavaScript%2Fissues%2Fnew%2Fchoose
ddunkinhttps://github.com/ddunkin
masterhttps://github.com/FacilityApi/FacilityJavaScript/tree/master
copilot/79-make-js-implementation-match-net-implementationhttps://github.com/FacilityApi/FacilityJavaScript/tree/copilot/79-make-js-implementation-match-net-implementation
Conversation 6 https://github.com/FacilityApi/FacilityJavaScript/pull/80
Commits 5 https://github.com/FacilityApi/FacilityJavaScript/pull/80/commits
Checks 3 https://github.com/FacilityApi/FacilityJavaScript/pull/80/checks
Files changed https://github.com/FacilityApi/FacilityJavaScript/pull/80/files
Please reload this pagehttps://github.com/FacilityApi/FacilityJavaScript/pull/80/files
Handle invalid JSON responses like .NET clients https://github.com/FacilityApi/FacilityJavaScript/pull/80/files#top
Show all changes 5 commits https://github.com/FacilityApi/FacilityJavaScript/pull/80/files
ea3134b Handle invalid JSON response parsing Copilot May 29, 2026 https://github.com/FacilityApi/FacilityJavaScript/pull/80/commits/ea3134bc834f12dcf75b3a5a78eb0cf0c7b25881
2076aca Refine invalid JSON test naming Copilot May 29, 2026 https://github.com/FacilityApi/FacilityJavaScript/pull/80/commits/2076aca2b3c065d3132d2b51d896a545038c4aad
38e15c7 Align invalid JSON error message with .NET client Copilot May 29, 2026 https://github.com/FacilityApi/FacilityJavaScript/pull/80/commits/38e15c7658e6cf1643bdd6b3edce56c3a67e101e
a5e4422 Refine invalid JSON response messaging Copilot May 29, 2026 https://github.com/FacilityApi/FacilityJavaScript/pull/80/commits/a5e4422bbb1554ad822e29994e090379687ee399
00a21dc Revert accidental package-lock update Copilot May 29, 2026 https://github.com/FacilityApi/FacilityJavaScript/pull/80/commits/00a21dc832bd644c2f9a5e09e299f4924060d09a
Clear filters https://github.com/FacilityApi/FacilityJavaScript/pull/80/files
Please reload this pagehttps://github.com/FacilityApi/FacilityJavaScript/pull/80/files
Please reload this pagehttps://github.com/FacilityApi/FacilityJavaScript/pull/80/files
facilityCore.ts https://github.com/FacilityApi/FacilityJavaScript/pull/80/files#diff-29c93b420fcf39698ed3306f01c19e46ae2a834132c1842b0c52014e2c112eab
fetchResponse.ts https://github.com/FacilityApi/FacilityJavaScript/pull/80/files#diff-013d827f8092f589925c1d7e2746d92ee34ed127a398885cd25210af3016d67c
ts/src/facilityCore.tshttps://github.com/FacilityApi/FacilityJavaScript/pull/80/files#diff-29c93b420fcf39698ed3306f01c19e46ae2a834132c1842b0c52014e2c112eab
View file https://github.com/FacilityApi/FacilityJavaScript/blob/00a21dc832bd644c2f9a5e09e299f4924060d09a/ts/src/facilityCore.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/FacilityApi/FacilityJavaScript/pull/80/{{ revealButtonHref }}
https://github.com/FacilityApi/FacilityJavaScript/pull/80/files#diff-29c93b420fcf39698ed3306f01c19e46ae2a834132c1842b0c52014e2c112eab
https://github.com/FacilityApi/FacilityJavaScript/pull/80/files#diff-29c93b420fcf39698ed3306f01c19e46ae2a834132c1842b0c52014e2c112eab
https://github.com/FacilityApi/FacilityJavaScript/pull/80/files#diff-29c93b420fcf39698ed3306f01c19e46ae2a834132c1842b0c52014e2c112eab
ts/test/fetchResponse.tshttps://github.com/FacilityApi/FacilityJavaScript/pull/80/files#diff-013d827f8092f589925c1d7e2746d92ee34ed127a398885cd25210af3016d67c
View file https://github.com/FacilityApi/FacilityJavaScript/blob/00a21dc832bd644c2f9a5e09e299f4924060d09a/ts/test/fetchResponse.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/FacilityApi/FacilityJavaScript/pull/80/{{ revealButtonHref }}
Please reload this pagehttps://github.com/FacilityApi/FacilityJavaScript/pull/80/files
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.