Log more descriptive error when anonymous org is not found

Was logging:

  [middleware.go:78 func·004()] [E] Anonymous access organization error%!(EXTRA <nil>)
This commit is contained in:
Jason Wilder 2015-03-12 11:49:05 -06:00
parent e78b358643
commit d3d896dccd

View File

@ -75,7 +75,7 @@ func GetContextHandler() macaron.Handler {
} else if setting.AnonymousEnabled {
orgQuery := m.GetOrgByNameQuery{Name: setting.AnonymousOrgName}
if err := bus.Dispatch(&orgQuery); err != nil {
log.Error(3, "Anonymous access organization error", nil)
log.Error(3, "Anonymous access organization error: '%s': %s", setting.AnonymousOrgName, err)
} else {
ctx.IsSignedIn = false
ctx.AllowAnonymous = true