HomeGuidesRecipesAPI
HomeGuidesAPILog In

Error Responses

The valid error codes for an endpoint are described individually in the documentation for each endpoint.

For non-success outcomes the JSON response is based on the OData v4 spec. The error response is a single JSON object with minimum properties of “code” and “message”. It may also contain “target”, “details”, and “innererror” if more information is available.
The root error object contains generic failure information for the service. Specific details can be added to nested inner error objects.

  • code”, server defined error code.
  • message”, human readable representation of the error.
  • target”, optional. Target of the particular error. Typically the name of a property in error.
  • details”, optional. An array of details about specific errors that led to this error. In .net this is the equivalent of an InnerException.
  • innererror”, optional. An object containing more specific information than the current object about the error.
{
	“error”: {
		“code”: “BadArgument”,
		“message”: “Previous passwords may not be reused”,
		“target”: “password”,
		“innererror”: {
			“code”: “PasswordError”,
			“innererror”: {
				“code”: “PasswordDoesNotMeetPolicy”
			}
		}
	}
}