Files
Elydora-Open-Source/packages/server/src/shared/constants/errors.ts
T
ZacharyZhang-NYandClaude Opus 4.6 e390e68594 Initial commit: Elydora Open Source — self-hosted audit platform for AI agents
Full self-hosted port of the Elydora tamper-evident audit protocol:
- Hono API server with PostgreSQL, Redis, MinIO adapters
- Ed25519 signed operations, chain hashing, Merkle epoch rollups
- PBKDF2 password hashing, HMAC-SHA256 JWT, 5-role RBAC
- Next.js management console
- Node.js, Python, and Go SDKs
- Docker Compose for local deployment
- Helm chart for Kubernetes
- Comprehensive security hardening and audit fixes applied

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:41:42 -05:00

20 lines
1.0 KiB
TypeScript

import type { ErrorCode } from '../types/enums.js';
/** Map of all Elydora error codes to default human-readable messages */
export const ERROR_CODES: Readonly<Record<ErrorCode, string>> = {
INVALID_SIGNATURE: 'The operation signature is invalid.',
UNKNOWN_AGENT: 'The specified agent does not exist.',
KEY_REVOKED: 'The signing key has been revoked.',
AGENT_FROZEN: 'The agent is frozen and cannot submit operations.',
TTL_EXPIRED: 'The operation TTL has expired.',
REPLAY_DETECTED: 'A duplicate nonce was detected (replay attack).',
PREV_HASH_MISMATCH: 'The previous chain hash does not match.',
PAYLOAD_TOO_LARGE: 'The operation payload exceeds the maximum allowed size.',
RATE_LIMITED: 'Too many requests. Please retry later.',
INTERNAL_ERROR: 'An internal server error occurred.',
UNAUTHORIZED: 'Authentication is required.',
FORBIDDEN: 'You do not have permission to perform this action.',
NOT_FOUND: 'The requested resource was not found.',
VALIDATION_ERROR: 'The request failed validation.',
} as const;