Issue: Missing Error Handling in scripts/build-pages.ts.
- Dominant language
- TypeScript
- Stars
- 716
- Forks
- 1.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 35
Description
### Describe the bug.
The script scripts/build-pages.ts does not implement proper error handling during file parsing and processing. When a Markdown file contains malformed frontmatter or unexpected structure, the script throws and crashes the entire build process without providing clear context.
This makes debugging failures—especially in CI/CD environments—slow and painful due to the lack of actionable error messages.
### Expected behavior
The build script should catch parsing-related errors and continue/exit gracefully while logging meaningful error details, instead of crashing silently or with generic stack traces.
### Screenshots
N/A
### How to Reproduce
Add a Markdown file with malformed or missing frontmatter.
Run the build script (e.g., npm run build or CI/CD pipeline).
Observe that the process crashes without clear contextual information about which file caused the failure.
### 🖥️ Device Information [optional]
Device Information (optional)
Operating System (OS): Windows / macOS / Linux
Browser: N/A
Browser Version: N/A
### 👀 Have you checked for similar open issues?
- [x] I checked and didn't find similar issue
### 🏢 Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md)
### Are you willing to work on this issue ?
Yes I am willing to submit a PR!
Contributor guide
Research direction
Start with scripts/build-pages.ts and reproduce the failure using a Markdown file with malformed or missing frontmatter, then run npm run build. Trace where parsing and processing errors escape, and ensure failures report the affected file with actionable details while the build exits or continues gracefully as intended. Verify the result in the build or CI/CD flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100