@orion-js/dogs 3.1.6 → 3.1.10

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.
@@ -10,6 +10,7 @@ exports.JobsRepo = void 0;
10
10
  const logger_1 = require("@orion-js/logger");
11
11
  const mongodb_1 = require("@orion-js/mongodb");
12
12
  const services_1 = require("@orion-js/services");
13
+ const lodash_1 = require("lodash");
13
14
  const JobRecord_1 = require("../types/JobRecord");
14
15
  let JobsRepo = class JobsRepo {
15
16
  constructor() {
@@ -135,7 +136,9 @@ let JobsRepo = class JobsRepo {
135
136
  });
136
137
  }
137
138
  catch (error) {
138
- if (error.code === 11000 && options.uniqueIdentifier) {
139
+ if (error.isValidationError &&
140
+ (0, lodash_1.values)(error.validationErrors).includes('notUnique') &&
141
+ options.uniqueIdentifier) {
139
142
  logger_1.logger.info(`Job "${options.name}" with identifier "${options.uniqueIdentifier}" already exists`);
140
143
  }
141
144
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-js/dogs",
3
- "version": "3.1.6",
3
+ "version": "3.1.10",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [
@@ -17,10 +17,10 @@
17
17
  "upgrade-interactive": "yarn upgrade-interactive"
18
18
  },
19
19
  "dependencies": {
20
- "@orion-js/helpers": "^3.1.6",
21
- "@orion-js/mongodb": "^3.1.6",
22
- "@orion-js/services": "^3.1.6",
23
- "@orion-js/typed-model": "^3.1.6"
20
+ "@orion-js/helpers": "^3.1.10",
21
+ "@orion-js/mongodb": "^3.1.10",
22
+ "@orion-js/services": "^3.1.10",
23
+ "@orion-js/typed-model": "^3.1.10"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@orion-js/logger": "3.1.0-alpha.12"
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "cb180a6a89ee2042f9d3dc80725f3aa05705a963"
42
+ "gitHead": "40fa0800303f49ad08890b2bedff2cdadb81360d"
43
43
  }