diff options
Diffstat (limited to 'app/graphql/types/container_repository_type.rb')
-rw-r--r-- | app/graphql/types/container_repository_type.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/graphql/types/container_repository_type.rb b/app/graphql/types/container_repository_type.rb index 67093f57862..1fe5cf112f0 100644 --- a/app/graphql/types/container_repository_type.rb +++ b/app/graphql/types/container_repository_type.rb @@ -28,5 +28,11 @@ module Types def project Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, object.project_id).find end + + def tags_count + object.tags_count + rescue Faraday::Error + raise ::Gitlab::Graphql::Errors::ResourceNotAvailable, 'We are having trouble connecting to the Container Registry. If this error persists, please review the troubleshooting documentation.' + end end end |