Skip to content

Commit

Permalink
Resolve minor configuration issues and response errors (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Nov 4, 2019
1 parent e0c96ef commit a44913b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docs/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@
"mfa_ui",
"login_ui",
"registration_ui",
"error_ui"
"error_ui",
"default_return_to"
],
"additionalProperties": false
},
Expand Down
2 changes: 1 addition & 1 deletion driver/configuration/provider_viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (

ViperKeySecretsSession = "secrets.session"

ViperKeyURLsDefaultReturnTo = "urls.self.default_return_to"
ViperKeyURLsDefaultReturnTo = "urls.default_return_to"
ViperKeyURLsSelfPublic = "urls.self.public"
ViperKeyURLsSelfAdmin = "urls.self.admin"
ViperKeyURLsLogin = "urls.login_ui"
Expand Down
7 changes: 5 additions & 2 deletions identity/pool_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,11 @@ LEFT OUTER JOIN identity_credential as ic ON
LEFT OUTER JOIN identity_credential_identifier as ici ON
ici.identity_credential_pk = ic.pk
%s`, where)
if err := p.db.SelectContext(ctx, &rows, p.db.Rebind(query), args...); err != nil {
return nil, sqlcon.HandleError(err)
if err := sqlcon.HandleError(p.db.SelectContext(ctx, &rows, p.db.Rebind(query), args...)); err != nil {
if errors.Cause(err) == sqlcon.ErrNoRows {
return nil, errors.WithStack(herodot.ErrNotFound.WithReasonf(`Identity could not be found.`))
}
return nil, err
}

if len(rows) == 0 {
Expand Down

0 comments on commit a44913b

Please sign in to comment.