MCPcopy Create free account
hub / github.com/agent-tower/core / errorResponse

Function errorResponse

packages/server/src/routes/workspaces.ts:61–63  ·  view source on GitHub ↗

* 统一错误响应格式

(error: string, code: string)

Source from the content-addressed store, hash-verified

59 * 统一错误响应格式
60 */
61function errorResponse(error: string, code: string) {
62 return { error, code };
63}
64
65function getInvocationId(request: { headers: Record<string, unknown> }): string | null {
66 const header = request.headers['x-agent-tower-invocation-id'];

Callers 1

workspaceRoutesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected