Skip to content

Commit

Permalink
Merge 4c9807a into 44be013
Browse files Browse the repository at this point in the history
  • Loading branch information
supereagle committed Sep 18, 2017
2 parents 44be013 + 4c9807a commit 6ce9150
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/rest/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ func getVersionLog(request *restful.Request, response *restful.Response) {
message := fmt.Sprintf("Unable to find version log by versionID %v", versionID)
log.ErrorWithFields(message, log.Fields{"user_id": userID, "error": err})
getResponse.ErrorMessage = message
response.WriteHeaderAndEntity(http.StatusNotFound, getResponse)
return
} else {
getResponse.Logs = result.Logs
}
Expand Down
4 changes: 4 additions & 0 deletions api/rest/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ func getVersion(request *restful.Request, response *restful.Response) {
message := fmt.Sprintf("Unable to find version %v", versionID)
log.ErrorWithFields(message, log.Fields{"user_id": userID, "error": err})
getResponse.ErrorMessage = message
response.WriteHeaderAndEntity(http.StatusNotFound, getResponse)
return
} else {
getResponse.Version = *result
}
Expand Down Expand Up @@ -214,6 +216,8 @@ func listVersions(request *restful.Request, response *restful.Response) {
message := "Unable to list version"
log.ErrorWithFields(message, log.Fields{"user_id": userID, "error": err})
listResponse.ErrorMessage = message
response.WriteHeaderAndEntity(http.StatusNotFound, listResponse)
return
} else {
listResponse.Versions = result
}
Expand Down

0 comments on commit 6ce9150

Please sign in to comment.