• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

doomcrewinc / foaas / 69
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: dependabot/npm_and_yarn/npm_and_yarn-4265e88a4c
DEFAULT BRANCH: master
Ran 16 Oct 2025 04:56AM UTC
Jobs 1
Files 93
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Oct 2025 04:55AM UTC coverage: 100.0%. Remained the same
69

push

circleci

doomcrewinc
Add error handling, environment validation, and input validation

This PR implements medium-risk improvements for security and stability:

**1. Centralized Error Handling Middleware**
- Created lib/errorHandler.js with 4-parameter error middleware
- Catches unhandled errors before they crash the server
- Logs errors with full context (stack, URL, IP, user agent)
- Hides error details in production, shows them in development
- Positioned before 622 fallback handler

**2. Environment Variable Validation**
- Created lib/env.js using envalid for schema validation
- Validates PORT, ENV, NODE_ENV, LOG_LEVEL, DEBUG
- Prevents runtime failures from misconfiguration
- Provides clear error messages for invalid values
- Updated all process.env access to use validated env object

**3. Input Validation for Route Parameters**
- Created lib/validators.js using express-validator
- Validates and sanitizes route parameters
- Prevents XSS attacks with sanitizer integration
- Max length enforcement (500 chars)
- Returns 400 with validation details on error
- Applied to default /:thing/:from route

**Testing**
All 461 specs passing, 0 failures.

**Dependencies Added**
- envalid: ^8.1.0 (environment validation)
- express-validator: ^7.2.1 (input validation)

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

461 of 461 relevant lines covered (100.0%)

1.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 69.1 16 Oct 2025 04:56AM UTC 93
100.0
Source Files on build 69
  • Tree
  • List 93
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • CircleCI Build #69
  • ea6bd58c on github
  • Prev Build on master (#68)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc