0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【WebAPI】ステータスコードを正しく使う 500番台編

Posted at

500番台のエラーは、クライアント側ではなくサーバー側に問題があった場合のエラー。

500 Internal Server Error

WEBアプリケーション開発をしているとよく見るエラー。サーバ側のコードにバグがあってエラーを吐いて処置が停止してしまった場合などに発生する。
500番台のエラーじゃログを監視して管理者に通知が行くように設定して、発生時に再発を防止するようにすることが推奨される。

503 Service Unavailable

サーバーが一時的に利用できない状態になっていることを示すもので、意図的にせよ、意図的でないにせよ、サーバが応答しなくなった場合に返すエラー。
意図的に返すケースは、メンテナンスのためにサービスを止めるケース。意図的でないケースは、サーバーが過負荷に陥ってレスポンスを返せなくなり、ロードバランサーなどWebサーバの前段にいるサーバが変えケースなどがある。


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?