Error Validation

Description

A validation error.

Properties

Property Description
detail

A longer description of of the error encountered.

info

Additional information that may be provided to aid in error resolution.

Property Description
errors

If the error response is a result of validation errors, it will most likely be a 400 Bad Request response and contain this info.errors property. Each property name in the errors object is a property that failed validation. These properties contain objects with property names in the form of internal validation error message slugs paired with human-readable string values describing the validation failure. Each property may have multiple validation failure messages.

reason

An optional reason for the error response.

In some cases, more information is required to convey information about the error to the client. In these cases, one of the following reason slugs may be used.

Reason Slug Description
contract-not-ready-to-countersign The contract is in a state that does not allow countersigning. Its status must be ready-to-countersign to perform this action.
event-photo-count-limit The event has reached the maximum number of photos allowed.
plan-does-not-allow-uploads The studio is in a plan that does not allow uploads or they have reached the limit of photos the plan allows.
status

The HTTP status code associated with this error.

title

A short description of the error encountered.

type

A namespace URI uniquely identifying the error type.

OpenAPI Schema

The following schema is based on OpenAPI 3.0 and is provided in our downloadable OpenAPI document.

{
  "description": "A validation error.",
  "properties": {
    "detail": {
      "description": "A longer description of of the error encountered.",
      "example": "There was a problem with your request. Please see `info` for more information.",
      "type": "string"
    },
    "info": {
      "description": "Additional information that may be provided to aid in error\nresolution.",
      "properties": {
        "errors": {
          "description": "If the error response is a result of validation errors, it\nwill most likely be a `400 Bad Request` response and contain\nthis `info.errors` property. Each property name in the\n`errors` object is a property that failed validation. These\nproperties contain objects with property names in the form\nof internal validation error message slugs paired with\nhuman-readable string values describing the validation\nfailure. Each property may have multiple validation failure\nmessages.",
          "example": {
            "name": {
              "notUnique": "The name must be unique"
            },
            "type": {
              "isEmpty": "Value is required and can't be empty"
            }
          },
          "type": "object"
        },
        "reason": {
          "description": "An optional reason for the error response.\n\nIn some cases, more information is required to convey information\nabout the error to the client. In these cases, one of the following\nreason slugs may be used.\n\n| Reason Slug | Description |\n| ----------- | ----------- |\n| `contract-not-ready-to-countersign` | The contract is in a state that does not allow countersigning. Its status must be `ready-to-countersign` to perform this action. |\n| `event-photo-count-limit` | The event has reached the maximum number of photos allowed. |\n| `plan-does-not-allow-uploads` | The studio is in a plan that does not allow uploads or they have reached the limit of photos the plan allows. |",
          "enum": [
            "contract-not-ready-to-countersign",
            "event-photo-count-limit",
            "plan-does-not-allow-uploads"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "status": {
      "description": "The HTTP status code associated with this error.",
      "example": 400,
      "type": "integer"
    },
    "title": {
      "description": "A short description of the error encountered.",
      "example": "Bad Request",
      "type": "string"
    },
    "type": {
      "description": "A namespace URI uniquely identifying the error type.",
      "example": "https://developer.shootproof.com/errors#error-bad-request",
      "format": "uri",
      "type": "string"
    }
  },
  "type": "object"
}