HTTP Status Code
HTTPステータスコード
HTTPステータスコードは、レスポンス内の3桁の数字です。それはリクエストの標準的な結果と、その結果グループを示します。
もう一つの例
インポートAPIは、作業が継続している間に202とステータスURLを返します。即時作成後には`Location`と共に201を返します。バージョンの衝突には409を返し、意味が無効なCSVフィールドには422を返します。JSON問題ボディは、コードの意味を変えることなく有用な詳細を追加します。
主な部分
- 01ステータスクラス
- 02登録済みコード
- 03レスポンスのメタデータおよび本文
以下の場合に使用します
結果に適合する最も正確に登録されたコードを返します。必要に応じて有用なヘッダーと安定したエラーボディも追加してください。
以下の場合は使用しないでください
ビジネス失敗ごとに常に 200 を返さないでください。また、秘密の認可情報を明かすほど具体的なエラーも避けてください。
コードで使用する名前
1xx informational, 2xx success, 3xx redirection, 4xx client, 5xx server 出荷前に
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome:Complete the task with HTTPステータスコード (HTTP Status Code)。 User context:インポートAPIは、作業が継続している間に202とステータスURLを返します。即時作成後には`Location`と共に201を返します。バージョンの衝突には409を返し、意味が無効なCSVフィールドには422を返します。JSON問題ボディは、コードの意味を変えることなく有用な詳細を追加します。 Technical concept or control:HTTPステータスコード (HTTP Status Code)。 Why it fits:結果に適合する最も正確に登録されたコードを返します。必要に応じて有用なヘッダーと安定したエラーボディも追加してください。 Do not use it when:ビジネス失敗ごとに常に 200 を返さないでください。また、秘密の認可情報を明かすほど具体的なエラーも避けてください。 Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary):この標準は、列挙された範囲のみを対象とします。視覚スタイル、製品の判断、またはVibularyの例は選びません。 Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
このリクエストを確認する
Review how HTTPステータスコード (HTTP Status Code) is used now. Definition: HTTPステータスコードは、レスポンス内の3桁の数字です。それはリクエストの標準的な結果と、その結果グループを示します。 Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.