Handle GitHub "Repository access blocked" error (#13648)
* Handle GitHub "Repository access blocked" error We've been seeing a lot of these errors on DEV, and it's a pretty reasonable expectation that if we're being blocked from seeing them using the user's OAuth access token that this isn't temporary. * Re-raise so we don't swallow this error * Constant name != company name???!?!?!
This commit is contained in:
parent
9970b1c2d5
commit
a2da070ca4
1 changed files with 6 additions and 0 deletions
|
|
@ -37,6 +37,12 @@ module GithubRepos
|
|||
Github::Errors::AccountSuspended,
|
||||
Github::Errors::RepositoryUnavailable
|
||||
repo.destroy
|
||||
rescue Github::Errors::ClientError => e
|
||||
if e.message.include? "Repository access blocked"
|
||||
repo.destroy
|
||||
else
|
||||
raise e
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue