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

Method Error

internal/server/start_write.go:16–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14type startWriteError struct{ code, holder, reason string }
15
16func (e *startWriteError) Error() string {
17 if e.code == "start_owner_only" {
18 switch e.reason {
19 case "activation":
20 return "Only workspace owners may make a start playbook active"
21 case "condition":
22 return "Only workspace owners may change the start condition of a start playbook"
23 }
24 return "Only workspace owners may set, change or clear start or change the role of a start playbook"
25 }
26 return fmt.Sprintf("clear start on %s first", e.holder)
27}
28func writeStartError(w http.ResponseWriter, err error) bool {
29 var e *startWriteError
30 if !errors.As(err, &e) {

Callers 2

writeStartErrorFunction · 0.95
bulkStoreErrorFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected