API error response
Summary
This is the list of errors that occur in each module/operation when making API requests.
Each response contains code
, message
, and field
data.
code
: a string indicating the error type code (e.g:invalid
if the request parameter is invalid)message
: standard error message in Kurocofield
: the request parameter where the error has occurred.
It is not generated in the case of general errors.
Errors list
Login
API | Condition | HTTP Status | Code | Field | Message(ja) | Message(en) | Note |
---|---|---|---|---|---|---|---|
login | Login authentication failed | 401 | unauthorized | - | Invalid credentials | Invalid credentials | It returns "status": 1 in addition to "errors" ("status": 0 for login success) |
profile | Not logged in(AccessToken unspecified) | 401 | - | - | - | - | {"errors": [ "[GW] Access Token is required"]} |
token | GrantToken invalid | 401 | unauthorized | - | Grant token is invalid, revoked or expired | Grant token is invalid, revoked or expired |
Topics
API | Condition | HTTP Status | Code | Field | Message(ja) | Message(en) | Note |
---|---|---|---|---|---|---|---|
list / detail | No topic group ID No topic ID | 404 | not_found | - | - | - | |
insert / update | No topic group ID | bad_request | - | コンテンツ定義は存在しません。 | Content Structure does not exist. | ||
No title | 400 | invalid | subject | タイトルは必須項目です。 | Title is required | ||
Extended data:text required input validation(without parameter) | 400 | required | ext_col_xx | Required property missing | Required property missing | ||
Extended data:text required input validation(empty string) | 400 | required | ext_col_xx | String is too short | String is too short | ||
Extended data:text input limit(E-mail) | 400 | invalid | ext_col_xx | Textが不正です。 E-mail形式で入力してください。 | Invalid Text Please enter in a {1} format. | ||
Extended data:text input limit(Tel) | 400 | invalid | ext_col_xx | Textが不正です。 電話番号形式で入力してください。 | Invalid Text Please enter in a {1} format. | ||
Extended data:text input limit(ZIP) | 400 | invalid | ext_col_xx | Textが不正です。 郵便番号形式で入力してください。 | Invalid Text Please enter in a {1} format. | ||
Extended data:text input limit(URL) | 400 | invalid | ext_col_xx | Textが不正です。 URL形式で入力してください。 | Invalid Text Please enter in a {1} format. | ||
Extended data:text input limit(Number) | 400 | invalid | ext_col_xx | Textが不正です。 数値形式で入力してください。 | Invalid Text Please enter in a {1} format. | ||
Extended data:text input limit(Regular Expression) | 400 | invalid | ext_col_xx | Textが不正です。 | Invalid Text Please enter in a {1} format. | ||
Extended data:text input limit(number of character) | 400 | invalid | ext_col_xx | Textの文字数が不正です。 | The number of characters in Text is invalid. |
Sample of error response
Below is a sample response of the error when the subject is empty or unspecified in the Add Content API.
{
"errors": [
{
"code": "invalid",
"message": "Title is required",
"field": "subject"
}
],
"x-rcms-request-id": "280496b2-8b45-4a9a-8a21-678feb77e2ff"
}
- In case of an error on a specific item,
field
contains the target item.