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.
()
| 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. |
| 3093 | func (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. |
no outgoing calls
no test coverage detected