Skip to content

Interface: ResourcefulFormattedErrorDetails

Individual error detail within a formatted error response. Provides field-level information for validation errors or error chain details.

Example

typescript
const detail: ResourcefulFormattedErrorDetails = {
  code: "E_REQUIRED",
  message: "The email field is required",
  target: "email",
  context: { field: "email", value: null },
};

Properties

PropertyTypeDescription
codestringMachine-readable error code (e.g., 'E_REQUIRED', 'E_INVALID_FORMAT')
context?JsonObjectAdditional context information about the error
messagestringHuman-readable error message
target?stringThe field or property that caused the error (for validation errors)