apigovau / national-api-design-standards

Australian National API Design Standards
35 stars 15 forks source link

Error handling error samples 400 incorrect #7

Closed wejrox closed 3 years ago

wejrox commented 4 years ago

The provided response code for an example of a 400 error is invalid JSON. It is missing end braces for source within the first error block. It should be:

{
  "errors": [{
    "id": "86032cbe-a804-4c3b-86ce-ec3041e3effc",
    "detail": "Invalid value(s) in request input",
    "code" : "19283",
    "source": {
      "parameter": "postcode"
    }
  },{
    "id": "45786a8f-452e-492f-a779-801b5d0bd0a7",
    "detail": "Input value(s) exceeded maximum length",
    "code" : "19284",
    "source": {
      "parameter": "last_name"
    }
  }]
}