@friggframework/core 2.0.0-next.74 → 2.0.0-next.75

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.
@@ -88,9 +88,16 @@ const loadIntegrationForWebhook = async (integrationId) => {
88
88
  moduleFactory,
89
89
  });
90
90
 
91
- const integrationRecord = await integrationRepository.findIntegrationById(
92
- integrationId
93
- );
91
+ let integrationRecord;
92
+ try {
93
+ integrationRecord =
94
+ await integrationRepository.findIntegrationById(integrationId);
95
+ } catch (error) {
96
+ if (error.message?.includes('not found')) {
97
+ return null;
98
+ }
99
+ throw error;
100
+ }
94
101
 
95
102
  const instance = await getIntegrationInstance.execute(
96
103
  integrationId,
@@ -151,6 +158,12 @@ const createQueueWorker = (integrationClass) => {
151
158
  integrationInstance = await loadIntegrationForWebhook(
152
159
  params.data.integrationId
153
160
  );
161
+ if (!integrationInstance) {
162
+ console.warn(
163
+ `[${integrationClass.Definition.name}] Integration ${params.data.integrationId} no longer exists. Discarding ${params.event} message.`
164
+ );
165
+ return;
166
+ }
154
167
  } else {
155
168
  // Instantiates a DRY integration class without database records.
156
169
  // There will be cases where we need to use helpers that the api modules can export.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@friggframework/core",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0-next.74",
4
+ "version": "2.0.0-next.75",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
7
7
  "@aws-sdk/client-kms": "^3.588.0",
@@ -38,9 +38,9 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@friggframework/eslint-config": "2.0.0-next.74",
42
- "@friggframework/prettier-config": "2.0.0-next.74",
43
- "@friggframework/test": "2.0.0-next.74",
41
+ "@friggframework/eslint-config": "2.0.0-next.75",
42
+ "@friggframework/prettier-config": "2.0.0-next.75",
43
+ "@friggframework/test": "2.0.0-next.75",
44
44
  "@prisma/client": "^6.17.0",
45
45
  "@types/lodash": "4.17.15",
46
46
  "@typescript-eslint/eslint-plugin": "^8.0.0",
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "8f935e0715e46299f5bc720d2ce8551da5d5705a"
83
+ "gitHead": "d8b091ab80329d8d8ed22c019d120f3122419bb9"
84
84
  }