GitHub GraphQL updateRefs generic error on a stale beforeOid #213655
Unanswered
sichikawa1123-web
asked this question in
Apps, API and Webhooks
Replies: 1 comment
|
Short answer: there is no such field. A failed beforeOid comparison just comes back as a generic error in the top level errors array, with no error code or type that says the ref moved. You cannot tell from the response alone whether it was a stale ref or something else. Here is how to pin it down instead:
There is no supported private channel for looking up a single GraphQL request ID, so the re-query in step 2 is the practical way to get your answer. Let me know if that clears it up. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
💬 Feature/Topic Area
API
Body
In a disposable repository, a two-ref updateRefs request succeeded with matching beforeOid values. The base ref fast-forwarded and the other ref kept the same OID. In a separate test with equivalent initial refs and update targets, only the expected base beforeOid was stale. The response was HTTP 200 with a generic execution error. Separate reads showed that neither ref changed.
Which response field or documented error identifies a failed beforeOid comparison and distinguishes it from an unrelated server error? If only the generic error is returned, is there a supported private channel or procedure to use the GitHub request ID to find out why the update was rejected?
All reactions