vermiculus / magithub

**DEPRECATED - please use Forge instead!** -- Magit-based interfaces to GitHub
GNU General Public License v3.0
579 stars 62 forks source link

Rate limited not enabled on github enterprise instances #327

Closed diasjorge closed 6 years ago

diasjorge commented 6 years ago

Hi,

I'm getting the following error from magithub Magithub is now offline: unknown issue: (ghub-http-error 404 "Not found" ((message . "Rate limiting is not enabled.") (documentation_url . "https://developer.github.com/enterprise/2.12/v3/rate_limit/#get-your-current-rate-limit-status")))

This happens when I ask magithub to refresh github data.

I think the related code is here: https://github.com/vermiculus/magithub/blob/d9bd5e4bfcab77c021bfb4573173e9bed48269dd/magithub-dash.el#L121

Could we catch the 404 error and set a limit on that case?

diasjorge commented 6 years ago

I forgot to mention that data is actually refreshed but you get a prompt saying "Github doesn't seem to be responding"

vermiculus commented 6 years ago

Yeah, that's handled 'correctly' here:

https://github.com/vermiculus/magithub/blob/76b0156323c9953a8c6f36ff483a2d528d8df9bc/magithub-core.el#L353-L362

but I'm not a fan of that function in general. Perhaps a ghub-plus function is warranted since we need such handling in multiple places.

vermiculus commented 6 years ago

Related #107.

vermiculus commented 6 years ago

Thanks for the report!