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

Method ContentSetAsideRows

internal/cli/client.go:3093–3104  ·  view source on GitHub ↗

ContentSetAsideRows reads details.set_aside_rows from a content_pending_flush refusal: how many set-aside edit rows caused it. Zero when the refusal was about unflushed edits only, or came from a server that predates BUG-3244.

()

Source from the content-addressed store, hash-verified

3091// refusal: how many set-aside edit rows caused it. Zero when the refusal was
3092// about unflushed edits only, or came from a server that predates BUG-3244.
3093func (e *APIError) ContentSetAsideRows() int {
3094 if e == nil || len(e.Details) == 0 {
3095 return 0
3096 }
3097 var d struct {
3098 SetAsideRows int `json:"set_aside_rows"`
3099 }
3100 if json.Unmarshal(e.Details, &d) != nil {
3101 return 0
3102 }
3103 return d.SetAsideRows
3104}
3105
3106// AsContentPendingFlush reports whether the server refused the write with
3107// content_pending_flush.

Callers 2

updateCmdFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected