playov2-js-utilities 0.3.41 → 0.3.42

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.
@@ -115,6 +115,15 @@ const deleteHttpTask = async (queueId, taskId) => {
115
115
  try {
116
116
  await cloudtasks.projects.locations.queues.tasks.delete(requestData);
117
117
  } catch (err) {
118
+ /*
119
+ Error response schema -
120
+ Naturally if GCP response is that task didn't exist while we were trying to delete it, then we should not
121
+ pass back the error to calle function and resume operations as normal. As delete operation is atomic and idempotent.
122
+ */
123
+ if (err.response.data && err.response.data.error && err.response.data.error.message === 'Requested entity was not found.') {
124
+ return Promise.resolve('success!');
125
+ }
126
+
118
127
  throw err;
119
128
  }
120
129
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playov2-js-utilities",
3
- "version": "0.3.41",
3
+ "version": "0.3.42",
4
4
  "description": "Private package for JS utility functions",
5
5
  "main": "index.js",
6
6
  "scripts": {