chore: add exception message for invalid path
value
#68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR
Note
I encountered a strange bug related to a Story in Storyblok. This PR might help identify the root cause.
Long Version
In the Storyblok API responses (both Management API and Content Delivery API), the
path
value was returned as an empty string (""
) instead ofnull
.Running the following command resulted in an error:Which produced:
As a result, many links were missing in the
LinkRegistry
, which is part of thestoryblok/symfony-bundle
.How to Fix This in Storyblok
Review the Content Delivery API response from Retrieve Multiple Links, for example:
Look for entries where
"path": ""
(the expected default is"path": null
).Delete and recreate the affected stories in the Storyblok editor.Final Note
I'm not sure whether this bug is easily reproducible in Storyblok — and I didn’t want to risk reproducing it in a production environment.
For context: the affected story had its
first_published_at
value changed, and multi-language support was enabled.