René's URL Explorer Experiment


Title: Consider using HTTP error response statuses where appropriate · Issue #170 · purescript/trypurescript · GitHub

Open Graph Title: Consider using HTTP error response statuses where appropriate · Issue #170 · purescript/trypurescript

X Title: Consider using HTTP error response statuses where appropriate · Issue #170 · purescript/trypurescript

Description: Right now, the API server returns 200 responses basically unconditionally. The readme says: Among other things, this makes it easier to use the API from another domain using CORS. But I don't think this is quite true, because according t...

Open Graph Description: Right now, the API server returns 200 responses basically unconditionally. The readme says: Among other things, this makes it easier to use the API from another domain using CORS. But I don't think...

X Description: Right now, the API server returns 200 responses basically unconditionally. The readme says: Among other things, this makes it easier to use the API from another domain using CORS. But I don't t...

Opengraph URL: https://github.com/purescript/trypurescript/issues/170

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consider using HTTP error response statuses where appropriate","articleBody":"Right now, the API server returns 200 responses basically unconditionally. The readme says:\r\n\r\n> Among other things, this makes it easier to use the API from another domain using CORS.\r\n\r\nBut I don't think this is quite true, because according to my reading of [the CORS spec](https://www.w3.org/TR/access-control/#resource-requests), 4xx and 5xx responses should be visible as long as the appropriate Access-Control-Allow-Origin header is set. It's only preflight requests which must return 2xx responses for the request to succeed, and we don't need to use those because we only use \"simple methods\" (GET and POST).\r\n\r\nI think a 200 response in the case where the code failed to compile is appropriate, but I don't think it's appropriate in a case where we are refusing the process the request because the body is too large; the 413 Request Entity Too Large response seems more appropriate for that. I'm not sure what the best way to handle modules not called Main is.\r\n\r\nRelatedly, I think we should add the appropriate CORS headers (in particular `Access-Control-Allow-Origin: *`) for compile.purescript.org in nginx, rather that on the individual scotty routes as we are doing currently. This way, clients from different origins would be able to handle errors which occur outside of the handling of those particular routes in Scotty, such as 404s for non existent endpoints, or 502s for if a deployment has gone wrong.","author":{"url":"https://github.com/hdgarrood","@type":"Person","name":"hdgarrood"},"datePublished":"2020-05-03T15:55:11Z","url":"https://github.com/purescript/trypurescript/issues/170"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ca00b1f4-3e1f-5620-0794-e6aaf786beb5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id80B8:39DA87:1D2B16:273E60:6AFBE11F
html-safe-nonceb1abf625fe005230d8a70701a1e06b92a6294995316ad49b633a6d59291e4615
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEI4OjM5REE4NzoxRDJCMTY6MjczRTYwOjZBRkJFMTFGIiwidmlzaXRvcl9pZCI6IjQ3NTIzOTU5MjYyOTc2MzMwNTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac71186865c05d10ddda2c3e6713f173731c15b81d0e34e8fb1661873b5c5f1ffe
hovercard-subject-tagissue:611444066
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/purescript/trypurescript/170/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ffb416e4b08790d05632cff7dc7942c628bdd808200c3a8895440a3763160a2b/purescript/trypurescript/issues/170
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ffb416e4b08790d05632cff7dc7942c628bdd808200c3a8895440a3763160a2b/purescript/trypurescript/issues/170
og:image:altRight now, the API server returns 200 responses basically unconditionally. The readme says: Among other things, this makes it easier to use the API from another domain using CORS. But I don't think...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehdgarrood
hostnamegithub.com
expected-hostnamegithub.com
None744d4381b1c4dbd6d8736c7d7e5bbe7dc11217584e457a3555020c631764e8ec
turbo-cache-controlno-preview
go-importgithub.com/purescript/trypurescript git https://github.com/purescript/trypurescript.git
octolytics-dimension-user_id6556677
octolytics-dimension-user_loginpurescript
octolytics-dimension-repository_id14093432
octolytics-dimension-repository_nwopurescript/trypurescript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id14093432
octolytics-dimension-repository_network_root_nwopurescript/trypurescript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedf859c48a4c8b4c0009c19bb4e82101aacb4b998
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/purescript/trypurescript/issues/170#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript%2Ftrypurescript%2Fissues%2F170
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%2Fpurescript%2Ftrypurescript%2Fissues%2F170
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=purescript%2Ftrypurescript
Reloadhttps://github.com/purescript/trypurescript/issues/170
Reloadhttps://github.com/purescript/trypurescript/issues/170
Reloadhttps://github.com/purescript/trypurescript/issues/170
purescripthttps://github.com/purescript
trypurescripthttps://github.com/purescript/trypurescript
Codehttps://github.com/purescript/trypurescript
Issues23 (23)https://github.com/purescript/trypurescript/issues
Pull requests5 (5)https://github.com/purescript/trypurescript/pulls
Actionshttps://github.com/purescript/trypurescript/actions
Security and qualityhttps://github.com/purescript/trypurescript/security
Insightshttps://github.com/purescript/trypurescript/pulse
https://github.com/purescript/trypurescript
New issuehttps://github.com/login?return_to=https://github.com/purescript/trypurescript/issues/170
New issuehttps://github.com/login?return_to=https://github.com/purescript/trypurescript/issues/170
Consider using HTTP error response statuses where appropriatehttps://github.com/purescript/trypurescript/issues/170#top
https://github.com/hdgarrood
hdgarroodhttps://github.com/hdgarrood
on May 3, 2020https://github.com/purescript/trypurescript/issues/170#issue-611444066
the CORS spechttps://www.w3.org/TR/access-control/#resource-requests
Sign up for freehttps://github.com/signup?return_to=https://github.com/purescript/trypurescript/issues/170
Sign in to commenthttps://github.com/login?return_to=https://github.com/purescript/trypurescript/issues/170
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.