@@ -273,7 +273,7 @@ Content-Type: application/vnd.api+json
273
273
274
274
If the API docs specified:
275
275
276
- > | Error Id | Title |
276
+ > | Error Code | Title |
277
277
> | ------------| -----------------------------------------------------------------------------------|
278
278
> | 11 | "Invalid Attribute" |
279
279
> | 123 | "too short" |
@@ -282,7 +282,7 @@ If the API docs specified:
282
282
> | 226 | "passwords do not match" |
283
283
> | 227 | "password cannot be one of last five passwords" |
284
284
285
- Multiple errors on ` password ` attribute, with error "id ":
285
+ Multiple errors on ` password ` attribute, with error "code ":
286
286
287
287
``` http
288
288
HTTP/1.1 422 Unprocessable Entity
@@ -291,25 +291,25 @@ Content-Type: application/vnd.api+json
291
291
{
292
292
"errors": [
293
293
{
294
- "id ": "123",
294
+ "code ": "123",
295
295
"source": { "pointer": "data/attributes/first-name" },
296
296
"detail": "First name must contain at least three characters."
297
297
},
298
298
{
299
- "id ": "225",
299
+ "code ": "225",
300
300
"source": { "pointer": "data/attributes/password" },
301
301
"detail": "Frobnicate is not a neologism."
302
302
},
303
303
{
304
- "id ": "226",
304
+ "code ": "226",
305
305
"source": { "pointer": "data/attributes/password" },
306
306
"detail": "Password and password confirmation do not match."
307
307
}
308
308
]
309
309
}
310
310
```
311
311
312
- Multiple errors on ` first-name ` attribute, with error "id ", and "title":
312
+ Multiple errors on ` first-name ` attribute, with error "code ", and "title":
313
313
314
314
``` http
315
315
HTTP/1.1 422 Unprocessable Entity
@@ -318,13 +318,13 @@ Content-Type: application/vnd.api+json
318
318
{
319
319
"errors": [
320
320
{
321
- "id ": "123",
321
+ "code ": "123",
322
322
"title": "too short",
323
323
"source": { "pointer": "data/attributes/first-name" },
324
324
"detail": "First name must contain at least three characters."
325
325
},
326
326
{
327
- "id ": "124",
327
+ "code ": "124",
328
328
"title": "emoji missing",
329
329
"source": { "pointer": "data/attributes/first-name" },
330
330
"detail": "First name must contain an emoji"
@@ -342,7 +342,7 @@ GET /posts/1,2,3,4
342
342
```
343
343
344
344
``` http
345
- HTTP/1.1 404 Not Found
345
+ HTTP/1.1 400 Bad Request
346
346
Content-Type: application/vnd.api+json
347
347
348
348
0 commit comments