Error message when leaving Repository settings page

Summary

When leaving the Repository settings page (/settings/repository) before the deploy keys have been updated, a red message is displayed on top "Error getting deploy keys". Nothing seems broken, changes (if any) are still applied, but it's not nice.

Steps to reproduce

Go to Settings > Repository, and "quickly" go somewhere else.

This happens on gitlab.com