Links API Errors

All responses including errors are presented in a standard Json string format.

Field validation errors

All values supplied are subject to validation and sanitisation. In the event that any value fails to meet the expected criteria a response giving details of the failure is returned, e.g.

{
  "status": 422,
  "errors": [{
    "location": "body",
    "param": "protocol",
    "value": true,
    "msg": "Invalid value"
  }]
}

 

Generic errors

Not found:
Applicable to methods: GET, PUT, DELETE

{
  "status": 404,
  "data": null,
  "message": "<item> Not found."
}

Duplicate entry:
Applicable to methods: POST

{
  "status": 400,
  "data": null,
  "message": "Link <item> already exists."
}

Unknown field:
Applicable to methods: POST, PUT

{
  "status": 400,
  "data": null,
  "message": "Unknown field <field>."
}

Invalid request body:
Applicable to methods: POST, PUT

{
  "status": 400,
  "data": null,
  "message": "Invalid request. Must specify request body."
}

Syntax error:
Applicable to methods: POST, PUT

{
  "status": 400,
  "data": null,
  "message": "Syntax error in Json request."
}