Merge pull request #8423 from unclejack/lint_changes

lint changes part 1
Upstream-commit: 9df3e45ba985a6ed7e9a07b308d56d694d1c13ad
Component: engine
This commit is contained in:
Tibor Vass
2014-10-21 12:15:58 -04:00
11 changed files with 107 additions and 85 deletions

View File

@ -92,7 +92,7 @@ func httpError(w http.ResponseWriter, err error) {
// FIXME: this is brittle and should not be necessary.
// If we need to differentiate between different possible error types, we should
// create appropriate error types with clearly defined meaning.
if strings.Contains(err.Error(), "No such") {
if strings.Contains(err.Error(), "no such") {
statusCode = http.StatusNotFound
} else if strings.Contains(err.Error(), "Bad parameter") {
statusCode = http.StatusBadRequest