Skip to content
This repository was archived by the owner on Aug 5, 2021. It is now read-only.

Commit 1c8bd89

Browse files
committed
Add info about validation errors
1 parent effa7e9 commit 1c8bd89

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

source/v1/index.html.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,30 @@ To Log in and try it out hit the "Try out" button.
132132
}
133133
```
134134

135+
> For Error Responses With Validation Errors
136+
137+
```json
138+
{
139+
"success": false,
140+
"error": {
141+
"type": "HttpNotFoundException",
142+
"message": "Page Not Found",
143+
"validation_errors": {
144+
"attribute": "validation error for the attribute"
145+
}
146+
}
147+
}
148+
```
149+
135150
All JSON responses from the API is wrapped in a base object.
136151

137152
Be sure to include an `Accept: application/json` header, otherwise errors like `401`, `403` & `404` will either return HTML or redirect you to the login page.
138153

154+
<aside class="warning">
155+
The current version (1.4.2) returns `validation_errors` as an array of string, this behavior will change the one described on the right in the next version 1.4.3. (no release ETA)
156+
</aside>
157+
158+
139159
## Headers
140160

141161
### Exposed Headers

0 commit comments

Comments
 (0)