Skip to content

Fix Error 500s loading repositories with inconsistent HEAD

Stan Hu requested to merge sh-fix-error-500-licensee into master

We removed the exception handling for Rugged errors in !16770 (merged), which revealed that the licensee gem attempts to retrieve a license file via Rugged from the file pointed by HEAD by default. If the referred branch did not exist, a Rugged::ReferenceError would be thrown.

Removing the exception handling caused repositories to fail loading. We can safely catch and ignore any Rugged error because this means we weren't able to load a license file.

Closes #43268 (closed)

Edited by Stan Hu

Merge request reports