mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-14 18:51:04 +00:00
refactor(codex): split app-server lifecycle seams
This commit is contained in:
@@ -65,10 +65,6 @@ export async function safeValue<T>(read: () => Promise<T>): Promise<SafeValue<T>
|
||||
try {
|
||||
return { ok: true, value: await read() };
|
||||
} catch (error) {
|
||||
return { ok: false, error: describeControlFailure(formatError(error)) };
|
||||
return { ok: false, error: describeControlFailure(error) };
|
||||
}
|
||||
}
|
||||
|
||||
function formatError(error: unknown): string {
|
||||
return error instanceof Error ? error.message : String(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user