badmfck-api-server 3.3.8 → 3.3.9

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.
@@ -365,7 +365,7 @@ class MysqlAdapter {
365
365
  throw { ...DefaultErrors_1.default.DB_ERROR, details: error.message, stack: error };
366
366
  return {
367
367
  data: null,
368
- error: this.createMysqlQueryError(e),
368
+ error: error,
369
369
  };
370
370
  }
371
371
  }
@@ -531,7 +531,7 @@ class MysqlAdapter {
531
531
  name: err.name,
532
532
  message: err.message,
533
533
  fatal: false,
534
- isDuplicateError: err.code === "ER_DUP_ENTRY"
534
+ isDuplicateError: err.code.toLowerCase().indexOf("dup_entry") !== -1
535
535
  };
536
536
  }
537
537
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "3.3.8",
3
+ "version": "3.3.9",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",