/**
 * Custom Error Classes for API Error Handling
 *
 * Defines specific error types that map to HTTP status codes:
 * - ValidationError → 400 Bad Request
 * - NotFoundError → 404 Not Found
 * - ConflictError → 409 Conflict
 *
 * Used by API endpoints to throw meaningful errors that are
 * caught and converted to proper HTTP responses by errorHandler.ts
 */

/**
 * Validation Error (400 Bad Request)
 * Thrown when request data is invalid or malformed
 */
export class ValidationError extends Error {
	constructor(message: string) {
		super(message);
		this.name = 'ValidationError';
	}
}

/**
 * Not Found Error (404 Not Found)
 * Thrown when requested resource does not exist
 */
export class NotFoundError extends Error {
	constructor(message: string) {
		super(message);
		this.name = 'NotFoundError';
	}
}

/**
 * Conflict Error (409 Conflict)
 * Thrown when operation conflicts with current resource state
 */
export class ConflictError extends Error {
	constructor(message: string) {
		super(message);
		this.name = 'ConflictError';
	}
}
