(w http.ResponseWriter, err error)
| 26 | return fmt.Sprintf("clear start on %s first", e.holder) |
| 27 | } |
| 28 | func writeStartError(w http.ResponseWriter, err error) bool { |
| 29 | var e *startWriteError |
| 30 | if !errors.As(err, &e) { |
| 31 | return false |
| 32 | } |
| 33 | if e.code == "start_owner_only" { |
| 34 | writeError(w, http.StatusForbidden, e.code, e.Error()) |
| 35 | } else { |
| 36 | writeError2(w, http.StatusConflict, e.code, e.Error(), map[string]any{"holder_ref": e.holder, "hint": e.Error()}) |
| 37 | } |
| 38 | return true |
| 39 | } |
| 40 | |
| 41 | // checkStartWrite runs under the workspace write lock through the item write |
| 42 | // hooks: every create door (createItemChecked), item update, and bulk assign. |
no test coverage detected