/** * Fastify error handler — translates known typed errors to stable HTTP status * codes and uniform `{ ok: false, error: { code, message } }` payloads. * * Codes (cross-referenced with `nat/types.ts`, `update/types.ts`, * `hosted/types.ts`): * - NatError * invalid_config, ddns_provider_unknown, * ddns_credentials_missing → 400 * unknown_node → 404 * secrets_unavailable, storage_error, * mapping_failed, router_unreachable, * ip_detection_failed, ddns_update_failed → 500 * - UpdateErrorException * manifest_invalid, no_update_available, * min_previous_version → 400 * apply_in_progress → 409 * signature_invalid, unsupported_state_version, * apply_failed, rollback_failed, storage_error → 500 * - HostedNodeError * invalid_request → 400 * not_found → 404 * invalid_state → 409 * orchestrator_error, storage_error → 500 * node_unavailable → 503 * - everything else → 500 (code "internal") */ import type { FastifyInstance } from 'fastify'; export declare function registerErrorHandler(app: FastifyInstance): void;