For isolated previews, theme switching, and sandbox editing, open the StatusCode playground on holydocs.com .

When to use

Use this component when endpoint documentation needs explicit request, response, schema, or lifecycle metadata.

Live Examples

Every example below renders the real component directly inside HolyDocs, followed by the exact MDX you can paste into a page.

Validation Error

Single detailed error card.

422

Validation failed

do not retry blindly
Meaning

The server parsed the request successfully but rejected one or more fields because they failed schema or business-rule validation.

Common causes
  • Malformed JSON body
  • Unknown enum value
  • Missing required field
Retry guidance

Correct the request payload and resend the same call.

mdx
<StatusCode code="422" title="Validation failed" causes="Malformed JSON body | Unknown enum value | Missing required field" retry="Correct the request payload and resend the same call." retryable={false}>The server parsed the request successfully but rejected one or more fields because they failed schema or business-rule validation.</StatusCode>

Props

PropTypeDefaultDescription
codestring400HTTP status code.
titlestring--Short title for the failure mode.
retrystring--Recommended retry behavior.

Usage

Start from this baseline shape and then tailor the copy, data, or nesting to the page you are writing.

mdx
<StatusCode code="422" title="Validation failed" causes="Malformed JSON body | Unknown enum value | Missing required field" retry="Correct the request payload and resend the same call." retryable={false}>The server parsed the request successfully but rejected one or more fields because they failed schema or business-rule validation.</StatusCode>

Tips

  • Keep naming and ordering consistent across fields, examples, and lifecycle notes so readers do not have to re-parse the endpoint surface on every page.
  • Document the happy path and the sharp edges together. Request shape alone is not enough without auth, errors, and retry guidance.
  • If a component renders into the right panel, verify the page on desktop width so you can confirm the supporting example is visible where readers expect it.
ParamField

Documents a request parameter — path, query, or body — with type, requirement status, and description.

Learn More
ResponseField

Documents a field in an API response body with its name, type, and description.

Learn More
Expandable

Collapsible section for nested API fields, keeping complex response shapes readable.

Learn More

More

Ask a question... ⌘I