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.
()
| 2732 | // refusal: how many set-aside edit rows caused it. Zero when the refusal was |
| 2733 | // about unflushed edits only, or came from a server that predates BUG-3244. |
| 2734 | func (e *APIError) ContentSetAsideRows() int { |
| 2735 | if e == nil || len(e.Details) == 0 { |
| 2736 | return 0 |
| 2737 | } |
| 2738 | var d struct { |
| 2739 | SetAsideRows int `json:"set_aside_rows"` |
| 2740 | } |
| 2741 | if json.Unmarshal(e.Details, &d) != nil { |
| 2742 | return 0 |
| 2743 | } |
| 2744 | return d.SetAsideRows |
| 2745 | } |
| 2746 | |
| 2747 | // AsContentPendingFlush reports whether the server refused the write with |
| 2748 | // content_pending_flush. |
no outgoing calls
no test coverage detected