-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
I'm getting this error wen using seriate with aws serverless functions:
TypeError: SqlContext Error. Failed on step "__result__" with: "Cannot read property 'pool' of null"
The class:
import seriate from 'seriate';
export default class SomethingSQLServer {
constructor() {
this.seriateService = seriate;
this.dbconfig = {
server: process.env.SQL_SERVER_ENDPOINT,
user: process.env.SQLSERVER_USERNAME,
password: process.env.SQLSERVER_PASSWORD,
database: process.env.PRODUCTS_DATABASE,
requestTimeout: 500000,
};
console.log('testing =>', this.dbconfig);
// this.seriateService.setDefaultConfig(this.dbconfig);
}
createSomething(somethingElse) {
return seriate.execute(this.dbconfig, {
// stream: true,
preparedSql: `INSERT INTO SOMETHING.dbo.SOMETHING_TABLE
(ds_something)
VALUES (@something)`,
params: {
something: {
val: somethingElse.something,
type: seriate.NVARCHAR,
},
},
});
}
}Always i'm getting:
TypeError: SqlContext Error. Failed on step "__result__" with: "Cannot read property 'pool' of null"
Anyone with the same error? Any soluction?
Metadata
Metadata
Assignees
Labels
No labels