MCPcopy Create free account
hub / github.com/bytebase/bytebase / formatChangeStepError

Function formatChangeStepError

backend/api/mcp/tool_change.go:586–588  ·  view source on GitHub ↗

formatChangeStepError formats a step failure into an MCP error result. It detects permission errors and wraps them appropriately.

(err error, defaultCode, permission string, partialRefs map[string]string)

Source from the content-addressed store, hash-verified

584// formatChangeStepError formats a step failure into an MCP error result.
585// It detects permission errors and wraps them appropriately.
586func formatChangeStepError(err error, defaultCode, permission string, partialRefs map[string]string) *mcp.CallToolResult {
587 return formatChangeStepErrorWithHint(err, defaultCode, permission, partialRefs, "")
588}
589
590// formatChangeStepErrorWithHint is like formatChangeStepError but replaces the
591// default suggestion with hint when non-empty, keeping the JSON shape intact.

Callers 1

handleChangeMethod · 0.85

Calls 1

Tested by

no test coverage detected