Skip to content

MCP Server - Implement error handling #16654

Open
@linear

Description

@linear

Right know, error handling is done manually by users, like so:

function handleError(err: unknown) {
  const eventId = Sentry.captureException(error);

  return [
    "**Error**",
    "There was an problem with your request.",
    "Please report the following to the user:",
    `**Event ID**: ${eventId}`,
    process.env.NODE_ENV !== "production"
      ? error instanceof Error
        ? error.message
        : String(error)
      : "",
  ].join("\n\n");
}

Metadata

Metadata

Assignees

Labels

javascriptPull requests that update javascript code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions