Add JSDOC @message
param to broken error pages
#6076
Merged
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.
Changes
Added JSDOC
@message
param toInvalidContentEntrySlugError
&ContentSchemaContainsSlugError
errors to fix their generated docs pages.The function we use in docs to extract the error messages from this file expects functions to follow this style:
These and a few other errors follow this, instead:
Not sure if this function style makes a difference in the core side of things, if possible I'd advocate going with the former function style so we avoid possible errors (and if it can't be avoided, to use
@message
for these error messages).When available, the docs doc gen script uses the JSDOC
@message
param instead, so I added it to the problematic functions as a fix. Also because they have dynamic values we can't bring to docs (like the currentcollection
orentryId
), in which case, it's better to use JSDoc anyway to overwrite these values withCOLLECTION_NAME
andENTRY_ID
, for extra clarity.Testing
Only JSDOC comments, shouldn't affect code behavior.
Docs
It's all docs baby 😎
cc @withastro/maintainers-docs for feedback!