Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2021-01-19 08:05:39 +0300
committerJaime Martinez <jmartinez@gitlab.com>2021-01-20 04:23:47 +0300
commit09144137f206ab70fe29fb172c606b8309018fc7 (patch)
treeba015081d250451d0ccdb5e9c1d66dfdbc529cfd /app.go
parentce03560d89e7315e24e6ade1fcb5ec14f0c82e39 (diff)
Simplify domain and resolver checks
Return domain not found Returns ErrDomainDoesNotExist when the lookup path cannot be found for a specific project. Closes https://gitlab.com/gitlab-org/gitlab-pages/issues/353 Return ErrDomainDoesNotExist in group resolver
Diffstat (limited to 'app.go')
-rw-r--r--app.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/app.go b/app.go
index 70ad6e1e..ec0c36a5 100644
--- a/app.go
+++ b/app.go
@@ -33,7 +33,6 @@ import (
"gitlab.com/gitlab-org/gitlab-pages/internal/request"
"gitlab.com/gitlab-org/gitlab-pages/internal/serving/disk/zip"
"gitlab.com/gitlab-org/gitlab-pages/internal/source"
- "gitlab.com/gitlab-org/gitlab-pages/internal/source/gitlab/client"
"gitlab.com/gitlab-org/gitlab-pages/internal/tlsconfig"
"gitlab.com/gitlab-org/gitlab-pages/metrics"
)
@@ -153,7 +152,7 @@ func (a *theApp) routingMiddleware(handler http.Handler) http.Handler {
// if we could not retrieve a domain from domains source we break the
// middleware chain and simply respond with 502 after logging this
host, d, err := a.getHostAndDomain(r)
- if err != nil && !errors.Is(err, client.ErrDomainDoesNotExist) {
+ if err != nil && !errors.Is(err, domain.ErrDomainDoesNotExist) {
metrics.DomainsSourceFailures.Inc()
log.WithError(err).Error("could not fetch domain information from a source")