Skip to content

Overhaul errors for consistency and correctness#16593

Open
yanthomasdev wants to merge 14 commits intomainfrom
errors-fix
Open

Overhaul errors for consistency and correctness#16593
yanthomasdev wants to merge 14 commits intomainfrom
errors-fix

Conversation

@yanthomasdev
Copy link
Copy Markdown
Member

Changes

This PR does an overhaul of all error messages to make them more consistent with each other, namely:

  • fixing missing full stop at the end of messages.
  • adding missing backticks to code excerpts.
  • adding () to differentiate functions from simple properties/objects.
  • improving error titles/messages with more context.

Testing

I am not sure if adding backticks in a few places could break rendering, we'll be sure once we get the automated PR on docs.

Docs

That's all it is.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 4, 2026

🦋 Changeset detected

Latest commit: dd42e62

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added pkg: astro Related to the core `astro` package (scope) docs pr labels May 4, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 4, 2026

Merging this PR will improve performance by 10.51%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 17 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation Build: hybrid site (static + server) 10.6 s 9.6 s +10.51%

Comparing errors-fix (dd42e62) with main (272185b)

Open in CodSpeed

Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

LGTM, I left some suggestions but none related to your changes (I spotted a few broken links).

But it seems you'll need to also update some tests because of the renamed errors (capitalization > tests failures).

Comment thread packages/astro/src/core/errors/errors-data.ts Outdated
Comment thread packages/astro/src/core/errors/errors-data.ts Outdated
* - [Dynamic Routes](https://docs.astro.build/en/guides/routing/#dynamic-routes)
* - [`getStaticPaths()`](https://docs.astro.build/en/reference/routing-reference/#getstaticpaths)
* - [Server-side Rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
* - [Server-side rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if we should take this opportunity to adjust the wording for consistency:

-Server-side rendering
+On-demand rendering

But this is used in several places so it might be easier to check the occurrence in an editor. That's said, this can also happen another time. Just a though while reviewing!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

True! I had that planned as a follow-up but forgot to mention in the PR description

yanthomasdev and others added 3 commits May 4, 2026 16:48
Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

I'm not sure about the view transition test, but core-image.test.ts is flaky! I had to rerun the test a few times this morning to merge a docs-only PR. So, LGTM! Thank you!

Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Mostly looks great — @yanthomasdev! Just one comment.

Comment thread packages/astro/src/core/errors/errors-data.ts Outdated
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Comment thread packages/astro/src/core/errors/errors-data.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs pr pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants