ErrorResponse

Error response object based on RFC 7807 Problem Details for HTTP APIs. See https://datatracker.ietf.org/doc/html/rfc7807 for details.

Response Format: A response is either in the new RFC 7807 Problem Details format OR the legacy Message format, but never both.

  • New Format (RFC 7807): Contains the type property and standard problem detail properties (title, detail, status). May also include additional extension members.
  • Legacy Format: Contains only the Message property. This format is used for some existing error responses during our transition to full RFC 7807 compliance.

Usage: Check if the type property is present. If it exists, the response is in RFC 7807 format. If type is absent, fall back to reading the Message property.

Properties

NameTypeDescription
typeString

A URI reference identifying the problem type. This property is always present in RFC 7807 responses.

titleString

A short, human-readable summary of the problem

detailString

A human-readable explanation specific to this occurrence of the problem

statusInteger

The HTTP status code

instanceString

A URI reference that identifies the specific occurrence of the problem

MessageString

Deprecated (Legacy Format Only): Contains the error message in the old response format. This property appears alone in legacy error responses and is mutually exclusive with the RFC 7807 properties above. Will be phased out as we complete our transition to RFC 7807.

Examples:

Modern RFC 7807 Problem Details format

{
  "type": "https://api.signhost.com/errors/validation-failed",
  "title": "Validation Failed",
  "detail": "One or more validation errors occurred",
  "status": 400,
  "errors": {
    "$": [
      "Some validation error"
    ]
  }
}

Legacy error response format

{
  "Message": "An error occurred while processing the request."
}