Error Codes Reference
Auto-generated
This page is auto-generated by scanning backend/src/routes/*.ts for error responses. Do not edit manually.
187 error responses found across 14 route files.
Client Errors (4xx)β
| Status | Message | Route File | Endpoint |
|---|---|---|---|
400 | Invalid permissions. Allowed: | admin.routes.ts | POST /roles |
400 | Cannot rename system role | admin.routes.ts | PATCH /roles/:id |
400 | Invalid permissions | admin.routes.ts | PATCH /roles/:id |
400 | Cannot delete system role | admin.routes.ts | DELETE /roles/:id |
400 | Validation failed | admin.routes.ts | POST /users |
400 | Password must be at least 8 characters | admin.routes.ts | POST /users/:id/reset-password |
400 | Password must contain at least one uppercase letter | admin.routes.ts | POST /users/:id/reset-password |
400 | Password must contain at least one lowercase letter | admin.routes.ts | POST /users/:id/reset-password |
400 | Password must contain at least one number | admin.routes.ts | POST /users/:id/reset-password |
400 | Use the profile page to change your own password | admin.routes.ts | POST /users/:id/reset-password |
400 | Cannot delete your own account | admin.routes.ts | DELETE /users/:id |
400 | Start and end dates required | admin.routes.ts | POST /archives |
400 | Invalid archive ID | admin.routes.ts | POST /archives/:id/restore |
400 | Invalid interval. Must be at least 1 hour. | admin.routes.ts | PUT /sync/config |
400 | Status must be | admin.routes.ts | POST /quarantine/:id/resolve |
400 | Safety confirmation required | admin.routes.ts | POST /diary/purge-seeds |
400 | Invalid scan ID. Must be a positive integer. | admin.routes.ts | GET /scan-history/scans/:scanId/history |
400 | At least one scan must be selected | admin.routes.ts | POST /scan-history/import |
400 | Invalid scanId: ${scan.scanId}. Must be a positive integer. | admin.routes.ts | POST /scan-history/import |
400 | historyIds for scan ${scan.scanId} must be an array | admin.routes.ts | POST /scan-history/import |
400 | Invalid dateRangeStart format | admin.routes.ts | POST /scan-history/import |
400 | Invalid dateRangeEnd format | admin.routes.ts | POST /scan-history/import |
400 | Cannot cancel job with status: ${job.status} | admin.routes.ts | POST /scan-history/jobs/:jobId/cancel |
400 | Cannot retry a job that is still in progress | admin.routes.ts | POST /scan-history/jobs/:jobId/retry-failed |
400 | No failed runs to retry | admin.routes.ts | POST /scan-history/jobs/:jobId/retry-failed |
400 | Bad Request | anomaly.routes.ts | POST /detect |
400 | Bad Request | apiConfig.routes.ts | PUT / |
400 | (dynamic message) | apiConfig.routes.ts | POST /sync-now |
400 | userId and newPassword are required | auth.routes.ts | POST /admin/reset-password |
400 | Password must be at least 8 characters | auth.routes.ts | POST /admin/reset-password |
400 | Password must contain at least one uppercase letter | auth.routes.ts | POST /admin/reset-password |
400 | Password must contain at least one lowercase letter | auth.routes.ts | POST /admin/reset-password |
400 | Password must contain at least one number | auth.routes.ts | POST /admin/reset-password |
400 | MFA code must be exactly 6 digits | auth.routes.ts | POST /mfa/validate |
400 | MFA token is required | auth.routes.ts | POST /mfa/validate |
400 | MFA not enabled for user | auth.routes.ts | POST /mfa/validate |
400 | MFA setup not initiated. Please start setup first. | auth.routes.ts | POST /mfa/verify |
400 | Invalid code. Please try again. | auth.routes.ts | POST /mfa/verify |
400 | Bad Request | auth.routes.ts | POST /refresh |
400 | (dynamic message) | dateExclusions.routes.ts | PUT /bulk |
400 | Bad Request | export.routes.ts | POST /vulnerabilities/start |
400 | Bad Request | reconciliation.routes.ts | POST /compare |
400 | Bad Request | savedFilters.routes.ts | GET / |
400 | Invalid ID format | security.routes.ts | POST /blocked-ips/:id/unblock |
400 | IP is already unblocked | security.routes.ts | POST /blocked-ips/:id/unblock |
400 | IP address is required | security.routes.ts | POST /blocked-ips |
400 | Invalid IP address or CIDR notation. Examples: 192.168.1.100, 10.0.0.0/24, 2001:db8::/32 | security.routes.ts | POST /blocked-ips |
400 | Invalid reason. Must be one of: ${validBlockReasons.join( | security.routes.ts | POST /blocked-ips |
400 | Duration cannot exceed ${MAX_DURATION_HOURS} hours (1 year) | security.routes.ts | POST /blocked-ips |
400 | Invalid reason. Must be one of: ${validReasons.join( | security.routes.ts | POST /whitelisted-ips |
400 | Description must be a string under 500 characters | security.routes.ts | POST /whitelisted-ips |
400 | IP is already removed from whitelist | security.routes.ts | POST /whitelisted-ips/:id/remove |
400 | (dynamic message) | sync.routes.ts | POST /start |
400 | Invalid frequency. Must be between 1 and 24 hours. | sync.routes.ts | PUT /frequency |
401 | Unauthorized | auth.routes.ts | POST /login |
401 | Invalid current password | auth.routes.ts | POST /change-password |
401 | Invalid or expired MFA token | auth.routes.ts | POST /mfa/validate |
401 | MFA validation failed | auth.routes.ts | POST /mfa/validate |
401 | Invalid MFA code | auth.routes.ts | POST /mfa/validate |
403 | Admin access required | admin.routes.ts | GET /severity-debug |
403 | Forbidden | auth.routes.ts | POST /login |
403 | Forbidden | export.routes.ts | GET /vulnerabilities/status/:jobId |
404 | Role not found | admin.routes.ts | PATCH /roles/:id |
404 | User not found | admin.routes.ts | PATCH /users/:id |
404 | Archive not found | admin.routes.ts | DELETE /archives/:id |
404 | Job not found | admin.routes.ts | GET /sync/job/:id/stats |
404 | Record not found | admin.routes.ts | POST /quarantine/:id/resolve |
404 | Job not found or expired | admin.routes.ts | GET /stats/recalculate/:jobId |
404 | Not Found | anomaly.routes.ts | PUT /:date/status |
404 | User not found | auth.routes.ts | POST /change-password |
404 | (dynamic message) | dateExclusions.routes.ts | PUT /:date/anomaly-status |
404 | Not Found | export.routes.ts | GET /vulnerabilities/status/:jobId |
404 | No logs to export | export.routes.ts | GET /sync-logs/download |
404 | Not Found | savedFilters.routes.ts | PUT /:id |
404 | Blocked IP entry not found | security.routes.ts | POST /blocked-ips/:id/unblock |
404 | Whitelist entry not found | security.routes.ts | POST /whitelisted-ips/:id/remove |
404 | (dynamic message) | vulnerabilities.routes.ts | GET /:pluginId |
405 | Method Not Allowed | apiConfig.routes.ts | POST / |
409 | Role already exists | admin.routes.ts | POST /roles |
409 | User with this email already exists | admin.routes.ts | POST /users |
409 | A recalculation is already in progress | admin.routes.ts | POST /stats/recalculate |
409 | GATEKEEPER_BLOCKED | admin.routes.ts | POST /stats/recalculate |
409 | An import job is already in progress | admin.routes.ts | POST /scan-history/import |
409 | Conflict | savedFilters.routes.ts | POST / |
409 | IP address is already blocked | security.routes.ts | POST /blocked-ips |
409 | IP address is already whitelisted | security.routes.ts | POST /whitelisted-ips |
409 | A backfill or rebuild operation is already running. Please wait for it to complete. | sync.routes.ts | POST /backfill |
Server Errors (5xx)β
| Status | Message | Route File | Endpoint |
|---|---|---|---|
500 | (dynamic message) | admin.routes.ts | GET /severity-debug |
500 | Failed to fetch roles | admin.routes.ts | GET /roles |
500 | Failed to create role | admin.routes.ts | POST /roles |
500 | Failed to update role | admin.routes.ts | PATCH /roles/:id |
500 | Failed to delete role | admin.routes.ts | DELETE /roles/:id |
500 | Failed to fetch users | admin.routes.ts | GET /users |
500 | Failed to create user | admin.routes.ts | POST /users |
500 | Failed to update user | admin.routes.ts | PATCH /users/:id |
500 | Failed to reset password | admin.routes.ts | POST /users/:id/reset-password |
500 | Failed to delete user | admin.routes.ts | DELETE /users/:id |
500 | Failed to unlock user | admin.routes.ts | POST /users/:id/unlock |
500 | Failed to fetch settings | admin.routes.ts | GET /settings |
500 | Failed to update settings | admin.routes.ts | PUT /settings |
500 | Failed to fetch archives | admin.routes.ts | GET /archives |
500 | Failed to create archive | admin.routes.ts | POST /archives |
500 | Failed to restore archive | admin.routes.ts | POST /archives/:id/restore |
500 | Failed to delete archive | admin.routes.ts | DELETE /archives/:id |
500 | Failed to fetch archive stats | admin.routes.ts | GET /archives/stats |
500 | Failed to detect gaps | admin.routes.ts | GET /sync/gaps |
500 | Failed to fetch job stats | admin.routes.ts | GET /sync/job/:id/stats |
500 | Failed to fetch sync logs | admin.routes.ts | GET /sync/logs |
500 | Failed to fetch sync config | admin.routes.ts | GET /sync/config |
500 | Failed to update sync config | admin.routes.ts | PUT /sync/config |
500 | Failed to fetch quarantine records | admin.routes.ts | GET /quarantine |
500 | Failed to fetch quarantine stats | admin.routes.ts | GET /quarantine/stats |
500 | Failed to resolve quarantine record | admin.routes.ts | POST /quarantine/:id/resolve |
500 | Failed to fetch coverage | admin.routes.ts | GET /stats/coverage |
500 | Failed to fetch cleanup logs | admin.routes.ts | GET /stats/cleanup-logs |
500 | Failed to get recalculation status | admin.routes.ts | GET /stats/recalculate/:jobId |
500 | Failed to fetch rate limit status | admin.routes.ts | GET /ratelimit/status |
500 | Failed to update rate limit config | admin.routes.ts | PUT /ratelimit/config |
500 | Failed to fetch severity filter | admin.routes.ts | GET /severity-filter |
500 | Failed to update severity filter | admin.routes.ts | PUT /severity-filter |
500 | Failed to fetch severity summary | admin.routes.ts | GET /severity-summary |
500 | Failed to validate snapshots | admin.routes.ts | GET /snapshots/validate |
500 | Failed to repair snapshots | admin.routes.ts | POST /snapshots/repair |
500 | Failed to discover scans | admin.routes.ts | GET /scan-history/scans |
500 | Failed to get history for scan ${scanId} | admin.routes.ts | GET /scan-history/scans/:scanId/history |
500 | Failed to start import job | admin.routes.ts | POST /scan-history/import |
500 | Failed to get job status | admin.routes.ts | GET /scan-history/jobs/:jobId |
500 | Failed to list import jobs | admin.routes.ts | GET /scan-history/jobs |
500 | Failed to cancel job | admin.routes.ts | POST /scan-history/jobs/:jobId/cancel |
500 | Failed to retry failed runs | admin.routes.ts | POST /scan-history/jobs/:jobId/retry-failed |
500 | Server Error | anomaly.routes.ts | GET /summary |
500 | Server Error | apiConfig.routes.ts | GET / |
500 | Sync Failed | apiConfig.routes.ts | POST /sync-now |
500 | Failed to fetch assets | assets.routes.ts | GET / |
500 | Failed to get asset summary | assets.routes.ts | GET /summary |
500 | Failed to get vulnerability counts | assets.routes.ts | GET /vulnerability-counts |
500 | Server Error | auth.routes.ts | POST /login |
500 | Failed to change password | auth.routes.ts | POST /change-password |
500 | Failed to reset password | auth.routes.ts | POST /admin/reset-password |
500 | MFA validation failed | auth.routes.ts | POST /mfa/validate |
500 | Failed to initiate MFA setup | auth.routes.ts | POST /mfa/setup |
500 | Failed to verify MFA | auth.routes.ts | POST /mfa/verify |
500 | Server Error | dashboard.routes.ts | GET /kpis |
500 | (dynamic message) | dateExclusions.routes.ts | GET / |
500 | Export Start Failed | export.routes.ts | POST /vulnerabilities/start |
500 | Status Check Failed | export.routes.ts | GET /vulnerabilities/status/:jobId |
500 | Download Failed | export.routes.ts | GET /vulnerabilities/download/:jobId |
500 | Export Failed | export.routes.ts | GET /vulnerabilities |
500 | Summary Failed | export.routes.ts | GET /summary |
500 | Logs Failed | export.routes.ts | GET /sync-logs |
500 | Server Error | reconciliation.routes.ts | GET /counts |
500 | Internal Server Error | savedFilters.routes.ts | GET / |
500 | Failed to fetch security logs | security.routes.ts | GET /logs |
500 | Failed to fetch security stats | security.routes.ts | GET /stats |
500 | Failed to check security alerts | security.routes.ts | GET /alerts |
500 | (dynamic message) | security.routes.ts | GET /health |
500 | Failed to fetch blocked IPs | security.routes.ts | GET /blocked-ips |
500 | Failed to unblock IP | security.routes.ts | POST /blocked-ips/:id/unblock |
500 | Failed to block IP | security.routes.ts | POST /blocked-ips |
500 | Failed to fetch whitelisted IPs | security.routes.ts | GET /whitelisted-ips |
500 | Failed to whitelist IP | security.routes.ts | POST /whitelisted-ips |
500 | Failed to remove whitelisted IP | security.routes.ts | POST /whitelisted-ips/:id/remove |
500 | Failed to get sync status | sync.routes.ts | GET /status |
500 | Failed to start sync | sync.routes.ts | POST /start |
500 | Failed to cancel sync | sync.routes.ts | POST /cancel/:syncId |
500 | Failed to run aggregation | sync.routes.ts | POST /aggregate |
500 | Failed to start backfill | sync.routes.ts | POST /backfill |
500 | Failed to start trend rebuild | sync.routes.ts | POST /rebuild-trends |
500 | Failed to get sync history | sync.routes.ts | GET /history |
500 | Failed to get sync frequency | sync.routes.ts | GET /frequency |
500 | Failed to set sync frequency | sync.routes.ts | PUT /frequency |
500 | Failed to get audit logs | sync.routes.ts | GET /audit-log |
500 | Failed to get stats | sync.routes.ts | GET /stats |
500 | Failed to get sync health metrics | sync.routes.ts | GET /health |
500 | Failed to get interrupted syncs | sync.routes.ts | GET /interrupted |
500 | Failed to resume sync | sync.routes.ts | POST /:id/resume |
500 | Failed to get integrity status | sync.routes.ts | GET /integrity-check |
500 | Failed to start integrity backfill | sync.routes.ts | POST /integrity-backfill |
500 | Failed to discard sync | sync.routes.ts | POST /:id/discard |
500 | Database not connected | verify.routes.ts | GET /verify-jan17 |
500 | (dynamic message) | verify.routes.ts | GET /verify-jan17 |
500 | (dynamic message) | vulnerabilities.routes.ts | GET / |
500 | Error fetching vulnerability summary | vulnerabilities.routes.ts | GET /summary |
503 | Database not available | admin.routes.ts | POST /users |
503 | Database unavailable | auth.routes.ts | POST /change-password |
503 | Database unavailable | savedFilters.routes.ts | GET / |
503 | Database unavailable | security.routes.ts | POST /blocked-ips/:id/unblock |
Generated on 2026-04-05