Consider using HTTP error response statuses where appropriate
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start by locating the Scotty route handlers and the nginx configuration for compile.purescript.org. Review how oversized bodies, compilation failures, missing endpoints, and deployment failures currently respond; done means the appropriate HTTP statuses and CORS behavior are defined and applied consistently.
索引モデルが issue の本文から書いたものです。
説明
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 to my reading of the CORS spec, 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).
I 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.
Relatedly, 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.
- 主要言語
- PureScript
- スター
- 121
- フォーク
- 51
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
purescript/trypurescript のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
purescript/trypurescript#309 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
purescript/trypurescript#308 ·
-
Publish as a library オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
purescript/trypurescript#303 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
purescript/trypurescript#301 · コメント 1 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
purescript/trypurescript#293 · コメント 7 件 ·
purescript/trypurescript の issue をすべて見る
似ている issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
growthbook/growthbook#7100 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
punkpeye/mcp-remote#369 ·
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Azure/azure-sdk-for-net#63292 · コメント 3 件 · リアクション 1 件 ·
-
bug p:3-mid pydanty:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
pydantic/pydantic-ai#8643 · コメント 1 件 ·