クラス DefaultHandlerExceptionResolver

java.lang.ObjectSE
org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver
実装されているすべてのインターフェース:
Ordered, HandlerExceptionResolver

public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionResolver
標準の Spring MVC 例外を解決し、対応する HTTP ステータスコードに変換する、HandlerExceptionResolver インターフェースのデフォルトの実装。

この例外リゾルバーは、一般的な Spring DispatcherServlet でデフォルトで有効になっています。

サポートされる例外

例外 HTTP ステータスコード
HttpRequestMethodNotSupportedException
405 (SC_METHOD_NOT_ALLOWED)
HttpMediaTypeNotSupportedException
415 (SC_UNSUPPORTED_MEDIA_TYPE)
HttpMediaTypeNotAcceptableException
406 (SC_NOT_ACCEPTABLE)
MissingPathVariableException
500 (SC_INTERNAL_SERVER_ERROR)
MissingServletRequestParameterException
400 (SC_BAD_REQUEST)
MissingServletRequestPartException
400 (SC_BAD_REQUEST)
ServletRequestBindingException
400 (SC_BAD_REQUEST)
ConversionNotSupportedException
500 (SC_INTERNAL_SERVER_ERROR)
TypeMismatchException
400 (SC_BAD_REQUEST)
HttpMessageNotReadableException
400 (SC_BAD_REQUEST)
HttpMessageNotWritableException
500 (SC_INTERNAL_SERVER_ERROR)
MethodArgumentNotValidException
400 (SC_BAD_REQUEST)
500 (SC_INTERNAL_SERVER_ERROR)
400 (SC_BAD_REQUEST)
NoHandlerFoundException
404 (SC_NOT_FOUND)
NoResourceFoundException
404 (SC_NOT_FOUND)
AsyncRequestTimeoutException
503 (SC_SERVICE_UNAVAILABLE)
AsyncRequestNotUsableException
適用不可
導入:
3.0
作成者:
Arjen Poutsma, Rossen Stoyanchev, Juergen Hoeller
関連事項:
  • フィールドの詳細

    • PAGE_NOT_FOUND_LOG_CATEGORY

      public static final StringSE PAGE_NOT_FOUND_LOG_CATEGORY
      リクエストに対してマップされたハンドラーが見つからない場合に使用するログカテゴリ。
      関連事項:
    • pageNotFoundLogger

      protected static final org.apache.commons.logging.Log pageNotFoundLogger
      リクエストに対してマップされたハンドラーが見つからない場合に使用する追加のロガー。
      関連事項:
  • コンストラクターの詳細

  • メソッドの詳細

    • doResolveException

      protected @Nullable ModelAndView doResolveException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler, ExceptionSE ex)
      クラスからコピーされた説明: AbstractHandlerExceptionResolver
      ハンドラーの実行中にスローされた特定の例外を実際に解決し、適切であれば特定のエラーページを表す ModelAndView を返します。

      特定の例外チェックを適用するために、サブクラスでオーバーライドできます。このテンプレートメソッドは、このリゾルバーが適用されるかどうか ( "mappedHandlers" など) を確認した後に呼び出されるため、実装では実際の例外処理をそのまま続行できます。

      次で指定:
      クラス AbstractHandlerExceptionResolverdoResolveException 
      パラメーター:
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー、または例外時に何も選択されなかった場合は null (たとえば、マルチパート解決が失敗した場合)
      ex - ハンドラーの実行中にスローされた例外
      戻り値:
      転送先の対応する ModelAndView、または解決チェーンでのデフォルト処理の場合は null 
    • handleHttpRequestMethodNotSupported

      protected @Nullable ModelAndView handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      HTTP メソッドのハンドラーが見つからない場合を処理します。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      ex - 処理される HttpRequestMethodNotSupportedException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー、または例外時に何も選択されなかった場合は null (たとえば、マルチパート解決が失敗した場合)
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleHttpMediaTypeNotSupported

      protected @Nullable ModelAndView handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupportedException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      PUT または POST されたコンテンツのメッセージコンバーターが見つからなかった場合を処理します。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      ex - 処理される HttpMediaTypeNotSupportedException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleHttpMediaTypeNotAcceptable

      protected @Nullable ModelAndView handleHttpMediaTypeNotAcceptable(HttpMediaTypeNotAcceptableException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      クライアントに受け入れられるメッセージコンバーターが見つからなかった場合を処理します(Accept ヘッダーを介して表現されます)。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      ex - 処理される HttpMediaTypeNotAcceptableException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleMissingPathVariable

      protected @Nullable ModelAndView handleMissingPathVariable(MissingPathVariableException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      宣言されたパス変数が抽出されたどの URI 変数とも一致しない場合のケースを処理します。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      ex - 処理される MissingPathVariableException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
      導入:
      4.2
    • handleMissingServletRequestParameter

      protected @Nullable ModelAndView handleMissingServletRequestParameter(MissingServletRequestParameterException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      必須パラメーターが欠落している場合に対処します。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      ex - 処理される MissingServletRequestParameterException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleMissingServletRequestPartException

      protected @Nullable ModelAndView handleMissingServletRequestPartException(MissingServletRequestPartException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      @RequestPartMultipartFilejakarta.servlet.http.Part 引数が必要であるが欠落しているケースを処理します。

      デフォルトでは、HTTP 400 エラーがクライアントに送り返されます。

      パラメーター:
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleServletRequestBindingException

      protected @Nullable ModelAndView handleServletRequestBindingException(ServletRequestBindingException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      回復不可能なバインディング例外が発生した場合 (必要なヘッダー、必要な Cookie など) を処理します。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      ex - 処理される例外
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleMethodArgumentNotValidException

      protected @Nullable ModelAndView handleMethodArgumentNotValidException(MethodArgumentNotValidException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      RequestBody または RequestPart 引数など、@Valid でアノテーションが付けられた引数が検証に失敗した場合の処理。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleHandlerMethodValidationException

      protected @Nullable ModelAndView handleHandlerMethodValidationException(HandlerMethodValidationException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      コントローラーメソッドのメソッド検証が失敗した場合を処理します。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      ex - 処理される例外
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
      導入:
      6.1
    • handleNoHandlerFoundException

      protected @Nullable ModelAndView handleNoHandlerFoundException(NoHandlerFoundException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      ディスパッチ中にハンドラーが見つからなかった場合を処理します。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      ex - 処理される NoHandlerFoundException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー、または例外時に何も選択されなかった場合は null (たとえば、マルチパート解決が失敗した場合)
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
      導入:
      4.0
    • handleNoResourceFoundException

      protected @Nullable ModelAndView handleNoResourceFoundException(NoResourceFoundException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      静的リソースが見つからなかった場合に対処します。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      ex - 処理される NoResourceFoundException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - リソースハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
      導入:
      6.1
    • handleAsyncRequestTimeoutException

      protected @Nullable ModelAndView handleAsyncRequestTimeoutException(AsyncRequestTimeoutException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      非同期リクエストがタイムアウトした場合を処理します。

      デフォルトの実装は null を返します。この場合、例外は handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で処理されます。

      パラメーター:
      ex - 処理される AsyncRequestTimeoutException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー、または例外時に何も選択されなかった場合は null (たとえば、マルチパート解決が失敗した場合)
      戻り値:
      例外が処理されたことを示す空の ModelAndView、または handleErrorResponse(ErrorResponse, HttpServletRequest, HttpServletResponse, Object) で例外を処理する必要があることを示す null 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
      導入:
      4.2.8
    • handleAsyncRequestNotUsableException

      protected ModelAndView handleAsyncRequestNotUsableException(AsyncRequestNotUsableException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler)
      ServletOutputStream からの I/O 障害の場合に対処します。

      デフォルトでは、レスポンスは使用できないため、何もしません。

      パラメーター:
      ex - 処理される AsyncRequestTimeoutException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー、または例外時に何も選択されなかった場合は null (たとえば、マルチパート解決が失敗した場合)
      戻り値:
      例外が処理されたことを示す空の ModelAndView
      導入:
      5.3.33
    • handleDisconnectedClientException

      protected ModelAndView handleDisconnectedClientException(ExceptionSE ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler)
      クライアントが去ったことを示す例外を処理します。これは通常、特定のサブ型の IOExceptionSE または基礎となるサーブレットコンテナーに固有のメッセージです。これらは DisconnectedClientHelper.isClientDisconnectedException(Throwable) を通じて検出されます。

      デフォルトでは、レスポンスは使用できないため、何もしません。

      パラメーター:
      ex - 処理される Exception 
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー、または例外時に何も選択されなかった場合は null (たとえば、マルチパート解決が失敗した場合)
      戻り値:
      例外が処理されたことを示す空の ModelAndView
      導入:
      6.2
    • handleErrorResponse

      protected ModelAndView handleErrorResponse(ErrorResponse errorResponse, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      ErrorResponse 例外を処理します。

      デフォルトの実装では、ステータスとレスポンスのヘッダーは ErrorResponse から取得したものになります。ProblemDetail.getDetail() が利用可能な場合は、それが HttpServletResponse.sendError(int, String) のメッセージとして使用されます。

      パラメーター:
      errorResponse - 処理される例外
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
      導入:
      6.0
    • handleConversionNotSupported

      protected ModelAndView handleConversionNotSupported(ConversionNotSupportedException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      WebDataBinder 変換が発生しないケースを処理します。

      デフォルトの実装は HTTP 500 エラーを送信し、空の ModelAndView を返します。または、フォールバックビューを選択するか、ConversionNotSupportedException をそのまま再スローできます。

      パラメーター:
      ex - 処理される ConversionNotSupportedException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleTypeMismatch

      protected ModelAndView handleTypeMismatch(TypeMismatchException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      WebDataBinder 変換エラーが発生した場合のケースを処理します。

      デフォルトの実装は HTTP 400 エラーを送信し、空の ModelAndView を返します。または、フォールバックビューを選択するか、TypeMismatchException をそのまま再スローできます。

      パラメーター:
      ex - 処理される TypeMismatchException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleHttpMessageNotReadable

      protected ModelAndView handleHttpMessageNotReadable(HttpMessageNotReadableException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      メッセージコンバーターが HTTP リクエストから読み取れない場合に対処します。

      デフォルトの実装は HTTP 400 エラーを送信し、空の ModelAndView を返します。または、フォールバックビューを選択するか、HttpMessageNotReadableException をそのまま再スローできます。

      パラメーター:
      ex - 処理される HttpMessageNotReadableException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleHttpMessageNotWritable

      protected ModelAndView handleHttpMessageNotWritable(HttpMessageNotWritableException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      メッセージコンバーターが HTTP レスポンスに書き込めない場合に対処します。

      デフォルトの実装は HTTP 500 エラーを送信し、空の ModelAndView を返します。または、フォールバックビューを選択するか、HttpMessageNotWritableException をそのまま再スローできます。

      パラメーター:
      ex - 処理される HttpMessageNotWritableException
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
    • handleMethodValidationException

      protected ModelAndView handleMethodValidationException(MethodValidationException ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @Nullable ObjectSE handler) throws IOExceptionSE
      たとえば、基盤となるサービスなど、Web コントローラーではないコンポーネントでメソッド検証が失敗した場合を処理します。

      デフォルトの実装は HTTP 500 エラーを送信し、空の ModelAndView を返します。または、フォールバックビューを選択するか、HttpMessageNotWritableException をそのまま再スローできます。

      パラメーター:
      ex - 処理される例外
      request - 現在の HTTP リクエスト
      response - 現在の HTTP レスポンス
      handler - 実行されたハンドラー
      戻り値:
      例外が処理されたことを示す空の ModelAndView 
      例外:
      IOExceptionSE - HttpServletResponse.sendError(int, String) から投げられる可能性がある
      導入:
      6.1
    • sendServerError

      protected void sendServerError(ExceptionSE ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOExceptionSE
      サーバーエラーを送信するために呼び出されます。ステータスを 500 に設定し、リクエスト属性 "jakarta.servlet.error.exception" を例外に設定します。
      例外:
      IOExceptionSE
    • logException

      protected void logException(ExceptionSE ex, jakarta.servlet.http.HttpServletRequest request)
      クラスからコピーされた説明: AbstractHandlerExceptionResolver
      "warnLogCategory" プロパティを介して警告ログが有効になっている場合、警告レベルで特定の例外をログに記録します。

      ログに記録する具体的なメッセージを判別するために、AbstractHandlerExceptionResolver.buildLogMessage(Exception, HttpServletRequest) を呼び出します。

      オーバーライド:
      クラス AbstractHandlerExceptionResolverlogException 
      パラメーター:
      ex - ハンドラーの実行中にスローされた例外
      request - 現在の HTTP リクエスト (メタデータの取得に役立ちます)
      関連事項: