Value Too Long

You gave us more than we can store

Purple gradient wave Purple wave used to give a visual break between the header and body of the page.

Summary

This error code signifies that you sent a value for a property that was too long.

For example, if you attempt to set a Title on an Employee entity that is more than 16 characters long you will receive this response.

curl -X PATCH \
  https://api.youmanage.co.uk/employees/5 \
  -H 'Authorization: ApiKey {ApiKey}' \
  -H 'Content-Type: application/json' \
  -d '{
	"Title": "Commander in Cheif"
}'

{
  "error": {
    "code": "YM1000",
    "reference": "https://developer.youmanage.co.uk/api/errors/ym1000",
    "target": "Validation",
    "message": "Validation failed",
    "details": [
      {
        "code": "YM1002",
        "reference": "https://developer.youmanage.co.uk/api/errors/ym1002",
        "target": "Title",
        "message": "Validation failed for a specific property",
        "details": [
          {
            "code": "YM1012",
            "reference": "https://developer.youmanage.co.uk/api/errors/ym1012",
            "target": "Title",
            "message": "The length of 'Title' must be 16 characters or fewer. You entered 18 characters.",
            "details": null
          }
        ]
      }
    ]
  }
}

  

Solution

Reissue the request but supply a value that is within the allowed bounds. The returned error response will tell you what the limit of the property is but you can also find the restrictions to properties on the API Reference.