@queue-it/fastly 5.0.1-beta.0 → 5.0.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@queue-it/fastly",
3
- "version": "5.0.1-beta.0",
3
+ "version": "5.0.2",
4
4
  "description": "Queue-it connector for Fastly",
5
5
  "main": "src/index.ts",
6
6
  "author": "devs@queue-it.com",
@@ -151,8 +151,8 @@ class FastlyHttpRequest implements IHttpRequest {
151
151
  if (this._decodeRequestBody) {
152
152
  try {
153
153
  return decodeURIComponent(this._bodyString);
154
- } catch {
155
- // fall through to return the raw body
154
+ } catch (e) {
155
+ console.error("Queue-it: failed to URL-decode request body, falling back to raw body:", e);
156
156
  }
157
157
  }
158
158
  return this._bodyString;
@@ -67,8 +67,10 @@ const integrationCustomerId = "customerId",
67
67
  directPassTimeoutKey = "directPassTimeout",
68
68
  isTestEnvironmentKey = "isTestEnvironment";
69
69
 
70
- export function resolveIntegrationDetails(): IntegrationDetails | null {
71
- const dict = new ConfigStore(integrationDictionary);
70
+ export function resolveIntegrationDetails(
71
+ configStoreName: string = integrationDictionary
72
+ ): IntegrationDetails | null {
73
+ const dict = new ConfigStore(configStoreName);
72
74
  if (
73
75
  dict.get(integrationCustomerId) === null ||
74
76
  dict.get(integrationApiKey) === null ||