log when error fetching repository

This commit is contained in:
Brad Rydzewski 2015-10-14 12:48:46 -07:00
parent 146d884f11
commit e3afea861b
2 changed files with 6 additions and 2 deletions

View file

@ -36,7 +36,7 @@ build:
go build
build_static:
go build --ldflags '-extldflags "-static" -X main.version=$(BUILD_NUMBER)' -o drone_static
go build --ldflags '-extldflags "-static" -X main.version=$(CI_BUILD_NUMBER)' -o drone_static
test:
go test -cover $(PACKAGES)

View file

@ -56,7 +56,11 @@ func SetRepo() gin.HandlerFunc {
// we can prompt the user to add.
if user != nil {
remote := context.Remote(c)
repo, _ = remote.Repo(user, owner, name)
repo, err = remote.Repo(user, owner, name)
if err != nil {
log.Errorf("Cannot get repository %s/%s for user %s. %s",
owner, user.Login, name, err)
}
}
data := gin.H{