@openfn/language-mssql 5.0.2 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -134,11 +134,7 @@ function execute(...operations) {
134
134
  createConnection,
135
135
  ...operations,
136
136
  cleanupState
137
- )({ ...initialState, ...state }).catch((e) => {
138
- console.error(e);
139
- console.error("Unhandled error in the operations. Exiting process.");
140
- process.exit(1);
141
- });
137
+ )({ ...initialState, ...state });
142
138
  };
143
139
  }
144
140
  function cleanupState(state) {
@@ -189,7 +185,7 @@ function queryHandler(state, query, callback, options) {
189
185
  const request = new import_tedious.Request(query, (err, rowCount, rows) => {
190
186
  if (err) {
191
187
  console.error(err.message);
192
- throw err;
188
+ reject(err);
193
189
  } else {
194
190
  console.log(`Finished: ${rowCount} row(s).`);
195
191
  resolve(callback(state, rows));
package/dist/index.js CHANGED
@@ -108,11 +108,7 @@ function execute(...operations) {
108
108
  createConnection,
109
109
  ...operations,
110
110
  cleanupState
111
- )({ ...initialState, ...state }).catch((e) => {
112
- console.error(e);
113
- console.error("Unhandled error in the operations. Exiting process.");
114
- process.exit(1);
115
- });
111
+ )({ ...initialState, ...state });
116
112
  };
117
113
  }
118
114
  function cleanupState(state) {
@@ -163,7 +159,7 @@ function queryHandler(state, query, callback, options) {
163
159
  const request = new Request(query, (err, rowCount, rows) => {
164
160
  if (err) {
165
161
  console.error(err.message);
166
- throw err;
162
+ reject(err);
167
163
  } else {
168
164
  console.log(`Finished: ${rowCount} row(s).`);
169
165
  resolve(callback(state, rows));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-mssql",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "description": "A Microsoft SQL language pack for OpenFn",
5
5
  "exports": {
6
6
  ".": {