Skip to content

Invalid publication (invalid-publication)

PubNio invalid-publication problem, HTTP 422: Post content, targets, destination resolution, or settings fail validation on create, update, or publish.

HTTP 422 Invalid publication. Post content, targets, destination resolution, or settings fail validation on create, update, or publish.

When it happens

Each failure is one entry in issues.

3 operations declare it: POST /api/v1/posts, POST /api/v1/posts/{postId}/publish, and PATCH /api/v1/posts/{postId}.

Response body

{
  "type": "https://pubnio.com/docs/problems/invalid-publication/",
  "status": 422,
  "title": "Invalid publication",
  "code": "invalid_publication",
  "issues": [
    {
      "code": "caption_too_long",
      "path": ["targets", 0, "text"],
      "message": "This caption contains 2301 characters. The limit is 2200."
    }
  ],
  "nextAction": "Fix the reported issues and retry.",
  "requestId": "0f8e4c2a-6b1d-4e3f-8a9b-7c6d5e4f3a21"
}
Field Type Always present
issues array of PostIssue Yes
candidates array of ProblemCandidate No
nextAction string No

Recovery for agents

  • Fix every entry in issues at its path; each issue code has its own page. When candidates is present, resend with one accountId from it.
  • Do what nextAction says.
  • Resend with one accountId from candidates instead of the ambiguous selector.
  • Each entry in issues has one of 29 code values that block publishing; the post issue codes section of the problem reference says how to fix each.

Retryable

No: the SDKs mark HTTP 422 not retryable.

Limits

  • Match on type or code, not on detail.

Type to search…

↑↓ navigate↵ selectEsc close