diff --git a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/build/BuildController.groovy b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/build/BuildController.groovy index 515292297..6e1e6d92a 100644 --- a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/build/BuildController.groovy +++ b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/build/BuildController.groovy @@ -19,16 +19,13 @@ package com.netflix.spinnaker.igor.build import com.fasterxml.jackson.databind.ObjectMapper import com.netflix.spinnaker.igor.build.model.GenericBuild import com.netflix.spinnaker.igor.jenkins.client.model.JobConfig -import com.netflix.spinnaker.igor.jenkins.client.model.QueuedJob import com.netflix.spinnaker.igor.model.BuildServiceProvider import com.netflix.spinnaker.igor.service.BuildMasters import groovy.transform.InheritConstructors import groovy.util.logging.Slf4j -import org.springframework.web.bind.annotation.ExceptionHandler -import retrofit.RetrofitError -import javax.servlet.http.HttpServletRequest import org.springframework.beans.factory.annotation.Autowired import org.springframework.http.HttpStatus +import org.springframework.web.bind.annotation.ExceptionHandler import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RequestMethod @@ -36,6 +33,9 @@ import org.springframework.web.bind.annotation.RequestParam import org.springframework.web.bind.annotation.RestController import org.springframework.web.servlet.HandlerMapping import org.yaml.snakeyaml.Yaml +import retrofit.RetrofitError + +import javax.servlet.http.HttpServletRequest import javax.servlet.http.HttpServletResponse import java.util.concurrent.ExecutorService @@ -208,6 +208,11 @@ class BuildController { it.fileName == fileName }?.relativePath + if (path == null) { + log.error("Unable to get properties: Could not find build artifact matching requested filename '${fileName}' on '${master}' build '${buildNumber}") + return map + } + def propertyStream = jenkinsService.getPropertyFile(job, buildNumber, path).body.in() if (fileName.endsWith('.yml') || fileName.endsWith('.yaml')) { diff --git a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/scm/github/CommitController.groovy b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/scm/github/CommitController.groovy index 86227e3cb..b69ae9ec2 100644 --- a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/scm/github/CommitController.groovy +++ b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/scm/github/CommitController.groovy @@ -54,6 +54,8 @@ class CommitController extends AbstractCommitController { } else if(e.response.status == 404) { return getNotFoundCommitsResponse(projectKey, repositorySlug, requestParams.to, requestParams.from, master.baseUrl) } + log.error("Unhandled error response, acting like commit response was not found", e) + return getNotFoundCommitsResponse(projectKey, repositorySlug, requestParams.to, requestParams.from, master.baseUrl) } commitsResponse.commits.each {