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

Function commitmentGraphCode

internal/mcp/errors.go:1994–2002  ·  view source on GitHub ↗

commitmentGraphCode preserves graph refusals across both MCP transports.

(code, route string)

Source from the content-addressed store, hash-verified

1992
1993// commitmentGraphCode preserves graph refusals across both MCP transports.
1994func commitmentGraphCode(code, route string) bool {
1995 switch ErrorCode(code) {
1996 case ErrInvalidBody:
1997 return cli.IsCommitmentRoute(route)
1998 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:
1999 return true
2000 }
2001 return false
2002}
2003func commitmentValidationDetails(raw json.RawMessage) bool {
2004 var d struct {
2005 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