Hi everyone,
I’m looking for technical guidance diagnosing an API startup failure in my Replit development workspace.
What is happening
-
The Vite frontend starts and the application page loads.
-
The Node.js/TypeScript API builds successfully.
-
However, the API exits with code 1 during startup, before opening its listening port.
-
API endpoints such as
/api/healthzand/api/auth/mereturn HTTP 502.
The startup error
ControlledRunError: Startup boundary rejected: POLICY_INVALID
at verifyAcceptancePolicyPayload
at prepareStartup
at startApplication
Relevant technical context
The application uses a custom guarded startup mode called acceptance. This is application-specific logic, not a standard Replit feature.
The startup validation expects:
-
A policy payload supplied as a string.
-
A separately configured SHA-256 integrity value containing exactly 64 lowercase hexadecimal characters.
-
A valid, unexpired authorization policy.
The error appears to occur during the initial payload/type/format validation, before hash comparison or policy-expiry validation.
A previous diagnostic check also indicated that the value received by the API for the SHA-256 integrity anchor did not appear to be in the expected hash format. We have not yet established why the API is receiving that value or where the configuration issue originates.
My questions
-
What would you recommend checking to determine why the API is receiving an incorrectly formatted startup configuration value?
-
Could Replit development-workspace configuration or runtime environment-variable delivery cause this type of issue?
-
What is the safest way to trace the values from their configured source into the API startup process without exposing secrets?
-
Which sanitized code excerpts or logs would help someone diagnose this?
I’m looking to restore normal API startup while preserving the existing validation and authorization safeguards. I do not want to disable the startup checks or bypass the security controls.
I appreciate any guidance or suggestions. Thank you!