---
schema_version: "1"
id: 34faa4eebd906d0141160a3833ffe41ea8d875cb0dc2161a9be71a7ffae694d8
title: エラー処理リファレンス
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/apikit/latest/apikit-odatav4-error-handling-reference.md
canonical_url: https://docs.mulesoft.com/jp/apikit/latest/apikit-odatav4-error-handling-reference
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3540f24158234b59af2bc12397a246386af1519ecbec09d7161c36cc31ae4019
description: MuleSoft Documentation Site
release: 4.x
latest: true
---
# エラー処理リファレンス

## [](#エラーの種類)エラーの種類

APIkit for OData v4 では、次のエラーの種類が定義されています。

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">エラーの種類</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIKIT-ODATA:NOT_IMPLEMENTED</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Requested service, feature, or operation not implemented (要求されたサービス、機能、または操作は実装されていません)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIKIT-ODATA:MALFORMED_URI</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Invalid request URI (要求 URI が無効です)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIKIT-ODATA:MALFORMED_SEARCH</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Invalid request ​<code>$search</code>​ expression in URI (URI の要求 $search 式が無効です)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIKIT-ODATA:SERIALIZATION</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Generic error for serialization issues (シリアル化の問題に関する汎用エラー)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIKIT-ODATA:DESERIALIZATION</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Generic error for deserialization issues (逆シリアル化の問題に関する汎用エラー)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIKIT-ODATA:TRANSFORMATION</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Generic error for issues related to URI to SQL transformations (URI から SQL への変換に関連する問題の汎用エラー)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIKIT-ODATA:INTERNAL_SERVER_ERROR</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Generic error for internal server issues (内部サーバーの問題に関する汎用エラー)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIKIT-ODATA:NOT_FOUND</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Generic error for not found (見つからなかった汎用エラー)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">APIKIT-ODATA:EXPANSION</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Generic error for issues during expansion (拡張時の問題に関する汎用エラー)</p></td>
</tr>
</tbody>
</table>

## [](#エラー処理)エラー処理

APIkit for OData v4 スキャフォルダーは、汎用エラーフォーマッターとして機能する 1 つの ​`On Error Propagate`​ キャッチを含むエラーハンドラーを生成します。

```xml
...
    <error-handler name="Error_Handler">
      <on-error-propagate name="On_Error_Propagate" enableNotifications="true" logException="true" type="ANY">
        <ee:transform>
          <ee:message>
            <ee:set-payload><![CDATA[%dw 2.0
output application/json
---
{
	error: {
		code: error.errorMessage.payload.code default "UNKNOWN",
		message: error.errorMessage.payload.message default error.description,
		target: error.errorMessage.payload.target,
		details: error.errorMessage.payload.details default [{code: "UNKNOWN", message: error.detailedDescription, target: null}],
		innererror: error.errorMessage.payload.innerError default error.childErrors
	}
}]]></ee:set-payload>
          </ee:message>
          <ee:variables>
            <ee:set-variable variableName="statusCode"><![CDATA[error.errorMessage.payload.statusCode default 500]]></ee:set-variable>
          </ee:variables>
        </ee:transform>
      </on-error-propagate>
    </error-handler>
...
```

## [](#関連情報)関連情報

- [Error Handlers](https://docs.mulesoft.com/mule-runtime/latest/error-handling)