diff --git a/src/autoscaler/db/sqldb/storedprocedure_sqldb.go b/src/autoscaler/db/sqldb/storedprocedure_sqldb.go index d93bf30ec0..98faa48263 100644 --- a/src/autoscaler/db/sqldb/storedprocedure_sqldb.go +++ b/src/autoscaler/db/sqldb/storedprocedure_sqldb.go @@ -116,20 +116,20 @@ func (sdb *StoredProcedureSQLDb) ValidateCredentials(ctx context.Context, creds // “cred_helper/storedprocedure_cred_helper.go” – we store in each column just the corresponding // app_id. To “mark that”, we use here the `as app_id`-renaming. query := fmt.Sprintf( - "SELECT instance_id as app_id, binding_id from %s($1,$2) WHERE binding_id = $3", + "SELECT instance_id as app_id, binding_id from %s($1,$2) WHERE app_id = $3", procedureIdentifier.Sanitize()) err := sdb.sqldb.QueryRow(ctx, query, creds.Username, creds.Password, appId). Scan(&credOptions.InstanceId, &credOptions.BindingId) if err == pgx.ErrNoRows { - sdb.logger.Error( + sdb.logger.Info( "user found but does not own the app behind the binding", err, lager.Data{"query": query, "creds": creds, "appId": appId}) return nil, errors.New("user found but does not own the app") } else if err != nil { sdb.logger.Error( - "validate-stored-procedure-credentials", + "credential-validation-with-stored-function-errored", err, lager.Data{"query": query, "creds": creds, "appId": appId}) return nil, err