playov2-js-utilities 0.3.42 → 0.3.43

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.
@@ -77,6 +77,9 @@ async function createHttpTask(queueId, payload, messageProcessingProperties, tas
77
77
  LOGGER.info(requestId, { name: response.name, response }, `Added task to queue ${queueId}}`);
78
78
  return response;
79
79
  } catch (err) {
80
+ if (err && err.code === 6) { // Idempotent request - assume sucess when the task being tried to save is already there!
81
+ return Promise.resolve('success!');
82
+ }
80
83
  throw err;
81
84
  }
82
85
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playov2-js-utilities",
3
- "version": "0.3.42",
3
+ "version": "0.3.43",
4
4
  "description": "Private package for JS utility functions",
5
5
  "main": "index.js",
6
6
  "scripts": {