Skip to content

Commit

Permalink
Fix log level and message to be unique and easy to find
Browse files Browse the repository at this point in the history
  • Loading branch information
sisidovski committed Jul 24, 2018
1 parent 52befdf commit e181799
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions people/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (h *Handler) getPersonViaConceptsAPI(uuid string) (person Person, found boo
}

if strings.Contains(concept.Type, "Person") == false {
logger.WithError(fmt.Errorf("Concept Type is not person. type %s, uuid: %s", concept.Type, uuid)).Warnf("Concept could not be retrieved")
logger.Infof("Concept Type is not person. type %s, uuid: %s", concept.Type, uuid)
return p, false, nil
}

Expand All @@ -131,12 +131,12 @@ func getConcept(uuid string, apiURL string) (concept Concept, err error) {

bytes, err := ioutil.ReadAll(resp.Body)
if err != nil {
logger.WithError(err).Warnf("Concept could not be retrieved")
logger.WithError(err).Warnf("Error reading response body")
return c, err
}

if err := json.Unmarshal(bytes, &c); err != nil {
logger.WithError(err).Warnf("Concept could not be retrieved")
logger.WithError(err).Warnf("Error parsing json")
return c, err
}

Expand Down

0 comments on commit e181799

Please sign in to comment.