MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / commitmentGraphCode

Function commitmentGraphCode

internal/mcp/errors.go:1917–1925  ·  view source on GitHub ↗

commitmentGraphCode preserves graph refusals across both MCP transports.

(code, route string)

Source from the content-addressed store, hash-verified

1915
1916// commitmentGraphCode preserves graph refusals across both MCP transports.
1917func commitmentGraphCode(code, route string) bool {
1918 switch ErrorCode(code) {
1919 case ErrInvalidBody:
1920 return cli.IsCommitmentRoute(route)
1921 case ErrTargetAfterDeadline, ErrReopenUnavailable, ErrReopenNotSupported, ErrReopenConflict, ErrReopenDependency, ErrReopenDeadlinePassed, ErrOccurrenceNotFired, ErrStaleOccurrence, ErrScheduleBroken, ErrScheduleBusy, ErrScheduleLinked, ErrDeadlineApprovalRequired, ErrLinkViolationAck, ErrCommitmentChanged, ErrLinkBudget, ErrLinkEditRequired, ErrScheduleLinkNotFound, ErrLinkCycle, ErrLinkSelf, ErrLinkDuplicateIncoming, ErrLinkLimit, ErrLinkInvalid, ErrGateDuplicate, ErrCommitmentPreviewRequired, ErrItemStillOpen, ErrNotEnded:
1922 return true
1923 }
1924 return false
1925}
1926func commitmentValidationDetails(raw json.RawMessage) bool {
1927 var d struct {
1928 Field string `json:"field"`

Callers 2

packageHTTPResponseFunction · 0.85
classifyHTTPStatusKindFunction · 0.85

Calls 2

IsCommitmentRouteFunction · 0.92
ErrorCodeTypeAlias · 0.85

Tested by

no test coverage detected