gitroomhq/postiz-app · error · BadBody

LinkedIn processing failed ` : ''}

Error message

LinkedIn ${label} processing failed${status.processingFailureReason ? `: ${status.processingFailureReason}` : ''}

What it means

Thrown by LinkedinProvider.checkPostStatus when LinkedIn reports a processingStatus of FAILED for an uploaded media asset (image/video/document). The message includes the media kind and LinkedIn's processingFailureReason if provided. The post is never published because LinkedIn could not finish processing the media.

Solutions

  1. Check processingFailureReason in the message and fix the media accordingly (re-encode video as H.264/MP4, reduce size/duration)
  2. Re-upload a fresh copy of the media; transient transcode failures often succeed on retry
  3. Verify the media matches LinkedIn's documented specs for the endpoint used
  4. If persistent across files, check LinkedIn API status / re-authenticate the integration

Example fix

// before
const file = await uploadVideo('clip.avi');
// after
const file = await uploadVideo('clip.mp4'); // H.264/AAC in MP4 container
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await provider.check(post);
} catch (e) {
  if (e instanceof BadBody && /LinkedIn (video|document|image) processing failed/.test(e.message)) {
    // re-encode/replace media and retry once
  }
  throw e;
}

Prevention

When it happens

Trigger: POSTing to LinkedIn's media upload endpoints (images/videos/documents) succeeds, but polling the asset status returns status='FAILED' (e.g. videos endpoint processing failed). Raised from check() during the post workflow.

Common situations: Unsupported video codec/container, media exceeding LinkedIn's duration/size limits, corrupt file, or LinkedIn transcode service hiccup. Intermittent LinkedIn-side transcoding failures also occur.

Related errors


AI-assisted analysis of gitroomhq/postiz-app@0f1647f749 (2026-08-27). Data as JSON: /api/errors/55010866716ed14b. Report an issue: GitHub.

Appendix: source

Thrown at libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts:955

        // Transient status-check error: the media may finish processing just
        // fine, keep polling.
        return {
          status: 'pending',
          pendingData: {
            ...pendingData,
            statusStalls: (pendingData.statusStalls || 0) + 1,
          },
        };
      }

      if (status.status === 'PROCESSING_FAILED') {
        const label =
          media.endpoint === 'videos'
            ? 'video'
            : media.endpoint === 'documents'
            ? 'document'
            : 'image';
        throw new BadBody(
          this.identifier,
          JSON.stringify(status),
          '{}',
          `LinkedIn ${label} processing failed${
            status.processingFailureReason
              ? `: ${status.processingFailureReason}`
              : ''
          }`
        );
      }

      if (status.status !== 'AVAILABLE') {
        stillProcessing.push(media);
      }
    }

    if (stillProcessing.length) {
      // every media answered with a real status: the endpoint works, reset

View on GitHub (pinned to 0f1647f749)