octocrab
octocrab copied to clipboard
422 Status code when updating commit on Github Enterprise Server
When I try to update a file on a repo using : octokit.repos().update_file().send() I get a 422 status code.
I'm on a Github Enterprise Server and using a Github App.
422 should be "Validation failed, or the endpoint has been spammed." according to the documentation (https://docs.github.com/en/[email protected]/rest/repos/contents?apiVersion=2022-11-28#create-or-update-file-contents)
But on my hand I don't "spam" the endpoint and on the other github app in Typescript we use the same endpoint and we don't have this returning status code.
Thank you for your issue! I don't have access to GitHub enterprise so I couldn't say. But I will accept a PR if someone can provide a fix :)
Is there a way to log requests made with octocrab so I can look for the content of it ?
Octocrab uses tower so you could create a custom http client with a logger.