クラスの使用
org.springframework.web.client.HttpStatusCodeException
HttpStatusCodeException を使用するパッケージ
org.springframework.web.client 内の HttpStatusCodeException 使用
修飾子と型クラス説明classHTTP 4xx を受信したときにスローされる例外。static final classHttpClientErrorExceptionステータス HTTP 400 Bad Requeststatic final classHttpClientErrorExceptionステータス HTTP 409 Conflictstatic final classHttpClientErrorExceptionステータス HTTP 403 Forbiddenstatic final classHttpClientErrorExceptionステータス HTTP 410 Gonestatic final classHttpClientErrorExceptionステータス HTTP 405 Method Not Allowedstatic final classHttpClientErrorExceptionステータス HTTP 406 Not Acceptablestatic final classHttpClientErrorExceptionステータス HTTP 404 Not Foundstatic final classHttpClientErrorExceptionステータス HTTP 429 Too Many Requestsstatic final classHttpClientErrorExceptionステータス HTTP 401 Unauthorizedstatic final classHttpClientErrorExceptionステータス HTTP 422 Unprocessable Contentstatic final class使用すべきではありません。static final classHttpClientErrorExceptionステータス HTTP 415 Unsupported Media TypeclassHTTP 5xx を受信したときにスローされる例外。static final classHTTP ステータス 502BadGateway のHttpServerErrorException。static final classHttpServerErrorExceptionステータス HTTP 504 Gateway Timeoutstatic final classHttpServerErrorExceptionステータス HTTP 500 Internal Server Errorstatic final classHttpServerErrorExceptionステータス HTTP 501 Not Implementedstatic final classHttpServerErrorExceptionステータス HTTP 503 Service Unavailable
HttpClientErrorException.UnprocessableContentを推奨