fix(auth): address Task 13 deployment review findings
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
const STARTUP_CAUSES = new Set([
|
||||
"auth_config_invalid",
|
||||
"auth_session_store_invalid",
|
||||
"workspace_registry_invalid",
|
||||
]);
|
||||
|
||||
/** Return one bounded machine cause; never include the original error text or stack. */
|
||||
export function formatStartupFailure(error: unknown): string {
|
||||
const message = error instanceof Error ? error.message : "";
|
||||
const cause = STARTUP_CAUSES.has(message) ? message : "startup_unknown";
|
||||
return `backend startup failed: ${cause}`;
|
||||
}
|
||||
Reference in New Issue
Block a user