MCPcopy
hub / github.com/cursor/cookbook / getFriendlyErrorMessage

Function getFriendlyErrorMessage

sdk/app-builder/src/components/app-builder.tsx:3572–3581  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

3570}
3571
3572function getFriendlyErrorMessage(error: unknown) {
3573 const message =
3574 error instanceof Error ? error.message : "The agent request failed."
3575
3576 if (message.toLowerCase().includes("already has active run")) {
3577 return "Cursor is still working on the previous request. Wait a moment and try again."
3578 }
3579
3580 return message
3581}
3582
3583function sanitizeModelCatalog(models: unknown[]) {
3584 const byId = new Map<string, ModelCatalogItem>()

Callers 1

sendMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected