tool::http-status-detail
202 Accepted
The request has been accepted but not yet acted upon.
ステータスコード
202
名前
Accepted
カテゴリ
2xx詳細説明
HTTP 202 Acceptedは、リクエストが処理のために受け付けられたが、まだ完了していないことを示します。非同期処理で使用され、サーバーが後でタスクを処理することを意味します。メール送信、ファイル処理、バッチジョブなど、即座に結果を返せない場合に適しています。
主な原因
- ▸非同期メール送信リクエストがキューに追加された場合
- ▸長時間のバッチジョブがバックグラウンド処理に登録された場合
- ▸外部サービス連携タスクが非同期で処理される場合
- ▸ファイル処理やレポート生成などの時間のかかるタスクが開始された場合
解決方法
- 1.202は正常なレスポンスのため、修正は不要です
- 2.処理状況確認のためのポーリングURLやWebhookをレスポンスに含めることを推奨します
- 3.非同期タスクが失敗した場合の通知メカニズムを実装してください
関連HTTPヘッダー
LocationContent-Typeレスポンス例
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /api/jobs/abc123
{"jobId":"abc123","status":"pending","checkUrl":"/api/jobs/abc123"}関連ステータスコード
200OKThe request has succeeded.→201CreatedThe request has been fulfilled and a new resource has been created.→203Non-Authoritative InformationThe response is from a transforming proxy, not the origin server.→204No ContentThe server successfully processed the request but returns no content.→205Reset ContentThe server processed the request; the client should reset the document view.→
ad · 300×250
// related tools