-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error updating "name" column #98
Comments
After hours and hours on the same problem here is the fix: DO NOT pass two params, pass 1 or 3+
Should work. |
I've just stumbled upon the same bug. Any ideas when this will be patched on NPM? |
Don't use
Should work |
Oh, it was driving me mad for an hour, because I have a table with columns |
const rds = require('data-api-client')({
secretArn: process.env.rdsSecretArn,
resourceArn: process.env.rdsArn,
database: process.env.rdsDatabase,
region: process.env.awsRegion,
});
await rds.query('update users set name = :name where email = :email', { name: 'Test User', email: 'test@gmail.com' });
BadRequestException: Cannot find parameter: name
at Object.extractError (/<>/node_modules/aws-sdk/lib/protocol/json.js:52:27)
at Request.extractError (/<>/node_modules/aws-sdk/lib/protocol/rest_json.js:55:8)
at Request.callListeners (/<>/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/<>/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/<>/node_modules/aws-sdk/lib/request.js:688:14)
at Request.transition (/<>/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/<>/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /<>/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/<>/node_modules/aws-sdk/lib/request.js:38:9)
at Request. (/<>/node_modules/aws-sdk/lib/request.js:690:12) {
code: 'BadRequestException',
time: 2021-06-18T02:03:16.626Z,
requestId: '',
statusCode: 400,
retryable: false,
retryDelay: 51.27294113391956
}
The text was updated successfully, but these errors were encountered: