Skip to main content

Errors

PublicSquare uses standard HTTP status codes to indicate whether an API request succeeded or failed. A response with a 2xx status code indicates success, a 4xx status code indicates a failure due to information provided with the request, and a 5xx status code indicates an unexpected error occurred within PublicSquare.

In general, errors are returned with a response body that conforms to the RFC 7807 - Problem Details for HTTP APIs specification, as illustrated below.

{
"type": "string",
"title": "string",
"status": 400,
"detail": "string",
"instance": "string",
"errors": {
"additionalProp1": ["string"],
"additionalProp2": ["string"],
"additionalProp3": ["string"]
}
}

Response

AttributeTypeDescription
titlestringA short, human-readable summary of the problem
detailstringA human-readable explanation specific to this occurrence of the problem
errors.{property}arrayAn array of human readable error messages returned per request {property}
statusintegerHTTP status code of the response

Error Codes

Error CodeMeaning
400Invalid request body
401A missing or invalid X-API-KEY was provided
403The provided X-API-KEY does not have the required permissions
404Resource was not found
409Conflict with the current state of the request entity
422Request does not satisfy requirements for processing
500Something went wrong on PublicSquare's side