Skip to content

🐛 [Bug]: Pulling and pushing assets results in an "error" #509

@JMReiner83

Description

@JMReiner83

Package

storyblok (CLI)

Bug Description

When pulling assets from one space and pushing to another space, the assets are created, but a failed status is returned and the process exits with code 1. The error log indicates an HTTP 422 error. Repeated attempts with trimmed down asset JSON files indicate the internal_tags_ids and internal_tags_list members may be the culprits; while the assets upload and are created successfully, the tags are not applied (they do exist before pull/push).

Steps to Reproduce

  1. Pull assets from one space. Assets are tagged with at least one tag.
  2. Push assets to another space. Tags should already exist in that space.

Expected Behavior

Assets should be uploaded to storage, created, and tagged. The process should exit successfully with exit code 0.

Actual Behavior

Assets are uploaded to storage and created; however, they are not tagged. The process fails with exit code 1.

Code Sample

Environment

storyblok components pull --separate-files --space=$STORYBLOK_SPACE_ID
storyblok datasources pull --separate-files --space=$STORYBLOK_SPACE_ID

Error Logs

{"timestamp":"2026-03-16T14:02:24.131Z","level":"INFO","message":"Pushing assets started","context":{"runId":1773669744129,"command":"storyblok assets push","options":{"updateStories":false,"from":"1023424","space":"290824385118662","verbose":false,"apiMaxRetries":3,"apiMaxConcurrency":6,"logConsoleEnabled":false,"logConsoleLevel":"info","logFileEnabled":true,"logFileLevel":"info","logFileMaxFiles":10,"uiEnabled":true,"reportEnabled":true,"reportMaxFiles":10},"cliVersion":"4.16.2"}}
{"timestamp":"2026-03-16T14:02:27.541Z","level":"ERROR","message":"The request was well-formed but was unable to be followed due to semantic errors","context":{"runId":1773669744129,"command":"storyblok assets push","options":{"updateStories":false,"from":"1023424","space":"290824385118662","verbose":false,"apiMaxRetries":3,"apiMaxConcurrency":6,"logConsoleEnabled":false,"logConsoleLevel":"info","logFileEnabled":true,"logFileLevel":"info","logFileMaxFiles":10,"uiEnabled":true,"reportEnabled":true,"reportMaxFiles":10},"cliVersion":"4.16.2","error":{"name":"API Error","message":"The request was well-formed but was unable to be followed due to semantic errors","httpCode":422,"httpStatusText":"Unprocessable Content","stack":"API Error: The request was well-formed but was unable to be followed due to semantic errors\n    at handleAPIError (file:///.../nextjs-site/node_modules/.pnpm/storyblok@4.16.2_@tiptap+pm_e30e530c8c1414fab7670443669288b4/node_modules/storyblok/dist/index.mjs:722:11)\n    at updateAsset (file:///.../nextjs-site/node_modules/.pnpm/storyblok@4.16.2_@tiptap+pm_e30e530c8c1414fab7670443669288b4/node_modules/storyblok/dist/index.mjs:7118:5)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async createAsset (file:///.../nextjs-site/node_modules/.pnpm/storyblok@4.16.2_@tiptap+pm_e30e530c8c1414fab7670443669288b4/node_modules/storyblok/dist/index.mjs:7136:26)\n    at async processAsset (file:///.../nextjs-site/node_modules/.pnpm/storyblok@4.16.2_@tiptap+pm_e30e530c8c1414fab7670443669288b4/node_modules/storyblok/dist/index.mjs:7697:22)\n    at async file:///.../nextjs-site/node_modules/.pnpm/storyblok@4.16.2_@tiptap+pm_e30e530c8c1414fab7670443669288b4/node_modules/storyblok/dist/index.mjs:7723:43"},"errorCode":"422","context":{"assetId":154600769927051}}}
{"timestamp":"2026-03-16T14:02:27.558Z","level":"INFO","message":"Pushing assets finished","context":{"runId":1773669744129,"command":"storyblok assets push","options":{"updateStories":false,"from":"1023424","space":"290824385118662","verbose":false,"apiMaxRetries":3,"apiMaxConcurrency":6,"logConsoleEnabled":false,"logConsoleLevel":"info","logFileEnabled":true,"logFileLevel":"info","logFileMaxFiles":10,"uiEnabled":true,"reportEnabled":true,"reportMaxFiles":10},"cliVersion":"4.16.2","summary":{"assetFolderResults":{"total":0,"succeeded":0,"failed":0},"assetResults":{"total":1,"succeeded":0,"failed":1,"skipped":0}}}}

Additional Context

CLI output:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions