Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve error messaging #893

Merged
merged 3 commits into from
Sep 25, 2024
Merged

fix: improve error messaging #893

merged 3 commits into from
Sep 25, 2024

Conversation

MayaGillilan
Copy link
Contributor

Makes debug messaging more explicit and meaningful, so as to make configuration issues and user debugging easier

@MayaGillilan MayaGillilan requested a review from a team September 18, 2024 13:32
@@ -180,7 +188,13 @@ export function getAllTaggedElements({
for (const { node, text } of stegaNodes) {
const sourceMap = decode(text);
if (!sourceMap || !sourceMap.origin.includes('contentful.com')) {
debug.warn;
debug.warn(
"Element has missing or invalid ContentSourceMap, please check if you have correctly enabled ContentSourceMaps and that the element's data originates from Contentful",
Copy link
Contributor

@2wce 2wce Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MayaGillilan are we trying to imply that the data shouldn't be transformed once it comes from our APIs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to admit I'm not as familiar with CSM so that was my understanding, but if that's an inaccurate description please let me know what would be more accurate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@2wce @YvesRijckaert Can you confirm if this is an appropriate message?

@MayaGillilan MayaGillilan changed the title feat: improve error messaging fix: improve error messaging Sep 18, 2024
Copy link
Collaborator

@aodhagan-cf aodhagan-cf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MayaGillilan MayaGillilan merged commit 5b87339 into main Sep 25, 2024
9 checks passed
@MayaGillilan MayaGillilan deleted the TOL-1885 branch September 25, 2024 10:13
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.

4 participants