Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

422 Status code when updating commit on Github Enterprise Server #694

Open
Pepiloto opened this issue Sep 13, 2024 · 3 comments
Open

422 Status code when updating commit on Github Enterprise Server #694

Pepiloto opened this issue Sep 13, 2024 · 3 comments

Comments

@Pepiloto
Copy link

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/enterprise-server@3.14/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.

@XAMPPRocky
Copy link
Owner

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 :)

@Pepiloto
Copy link
Author

Is there a way to log requests made with octocrab so I can look for the content of it ?

@XAMPPRocky
Copy link
Owner

Octocrab uses tower so you could create a custom http client with a logger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants