Skip to content

Conversation

@oluosiname
Copy link

@oluosiname oluosiname commented Sep 29, 2025

PR Summary

  • Implemented targeted handling for UUID conflict during folder/story sync:

    • Added isUUIDTakenError(error) to detect top-level 422 with response ['UUID has already been taken'].
    • In updateStoriesAndFolders, silently ignore only that specific UUID error when updating UUID; rethrow everything else to be handled by existing outer catches.
  • Why we do not show this specific error to the client:

    • UUID conflicts are an expected and benign outcome of syncing existing content between spaces. They occur when the target already contains the same UUID, which does not affect the final state we want (the items remain correctly synced). Surfacing this to the user adds noise and confusion without actionable value, so we suppress this one case while still surfacing all other errors.

Notes

  • No changes to CLI interface or command options.
  • No changes to normal logging for other failure cases.
  • Behavior remains identical except for suppressing the one expected UUID-taken error during UUID alignment.

How to test this PR

  • Create a folder in a space A
  • Create a folder in another space B
  • Update folder in Space B to have same uuid as folder in Space A
  • Run Sync folders command with source Space A and target Space B
  • Sync should happen and not display any error

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 6, 2025

Open in StackBlitz

npm i https://pkg.pr.new/storyblok@249

commit: a60280c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant