@flowcore/sdk 1.9.3 → 1.10.1
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/CHANGELOG.md +20 -0
- package/esm/commands/api-key/api-key.create.d.ts +15 -3
- package/esm/commands/api-key/api-key.create.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.create.js +31 -11
- package/esm/commands/api-key/api-key.delete.d.ts +1 -1
- package/esm/commands/api-key/api-key.delete.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.delete.js +2 -2
- package/esm/commands/api-key/api-key.list.d.ts +1 -1
- package/esm/commands/api-key/api-key.list.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.list.js +2 -2
- package/esm/commands/data-core/data-core.create.d.ts +6 -2
- package/esm/commands/data-core/data-core.create.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.create.js +12 -0
- package/esm/commands/data-core/data-core.delete-request.d.ts +6 -6
- package/esm/commands/data-core/data-core.delete-request.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.delete-request.js +7 -7
- package/esm/commands/data-core/data-core.fetch.d.ts +8 -4
- package/esm/commands/data-core/data-core.fetch.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.fetch.js +12 -1
- package/esm/commands/data-core/data-core.list.d.ts +2 -2
- package/esm/commands/data-core/data-core.list.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.update.d.ts +3 -3
- package/esm/commands/data-core/data-core.update.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.update.js +1 -1
- package/esm/commands/event-type/event-type.create.d.ts +6 -2
- package/esm/commands/event-type/event-type.create.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.create.js +12 -0
- package/esm/commands/event-type/event-type.delete-request.d.ts +8 -4
- package/esm/commands/event-type/event-type.delete-request.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.delete-request.js +13 -4
- package/esm/commands/event-type/event-type.fetch.d.ts +7 -3
- package/esm/commands/event-type/event-type.fetch.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.fetch.js +12 -1
- package/esm/commands/event-type/event-type.list.d.ts +2 -2
- package/esm/commands/event-type/event-type.list.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.update.d.ts +1 -1
- package/esm/commands/event-type/event-type.update.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.update.js +2 -2
- package/esm/commands/events/events.fetch-time-buckets-by-names.d.ts +1 -1
- package/esm/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -1
- package/esm/commands/events/events.fetch-time-buckets-by-names.js +2 -1
- package/esm/commands/events/events.fetch.d.ts +1 -1
- package/esm/commands/events/events.fetch.d.ts.map +1 -1
- package/esm/commands/events/events.fetch.js +2 -2
- package/esm/commands/flow-type/flow-type.create.d.ts +6 -2
- package/esm/commands/flow-type/flow-type.create.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.create.js +12 -0
- package/esm/commands/flow-type/flow-type.delete-request.d.ts +13 -6
- package/esm/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.delete-request.js +13 -4
- package/esm/commands/flow-type/flow-type.fetch.d.ts +9 -5
- package/esm/commands/flow-type/flow-type.fetch.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.fetch.js +12 -1
- package/esm/commands/flow-type/flow-type.list.d.ts +2 -2
- package/esm/commands/flow-type/flow-type.list.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.update.d.ts +3 -3
- package/esm/commands/flow-type/flow-type.update.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.update.js +1 -1
- package/esm/commands/secret/secret.create.d.ts +1 -1
- package/esm/commands/secret/secret.create.d.ts.map +1 -1
- package/esm/commands/secret/secret.create.js +2 -2
- package/esm/commands/secret/secret.delete.d.ts +1 -1
- package/esm/commands/secret/secret.delete.d.ts.map +1 -1
- package/esm/commands/secret/secret.delete.js +2 -3
- package/esm/commands/secret/secret.list.d.ts +1 -1
- package/esm/commands/secret/secret.list.d.ts.map +1 -1
- package/esm/commands/secret/secret.list.js +2 -2
- package/esm/commands/tenant/tenant.fetch.d.ts +5 -6
- package/esm/commands/tenant/tenant.fetch.d.ts.map +1 -1
- package/esm/commands/tenant/tenant.fetch.js +7 -5
- package/esm/commands/tenant/tenant.list.d.ts +1 -1
- package/esm/commands/tenant/tenant.list.d.ts.map +1 -1
- package/esm/commands/tenant/tenant.list.js +2 -2
- package/esm/commands/variable/variable.create.d.ts +1 -1
- package/esm/commands/variable/variable.create.d.ts.map +1 -1
- package/esm/commands/variable/variable.create.js +2 -2
- package/esm/commands/variable/variable.delete.d.ts +1 -1
- package/esm/commands/variable/variable.delete.d.ts.map +1 -1
- package/esm/commands/variable/variable.delete.js +2 -2
- package/esm/commands/variable/variable.list.d.ts +1 -1
- package/esm/commands/variable/variable.list.d.ts.map +1 -1
- package/esm/commands/variable/variable.list.js +2 -2
- package/esm/common/command.d.ts +28 -6
- package/esm/common/command.d.ts.map +1 -1
- package/esm/common/command.js +43 -5
- package/esm/common/flowcore-client.d.ts.map +1 -1
- package/esm/common/flowcore-client.js +18 -11
- package/esm/exceptions/not-found.d.ts +1 -1
- package/esm/exceptions/not-found.d.ts.map +1 -1
- package/esm/exceptions/not-found.js +2 -2
- package/package.json +1 -1
- package/script/commands/api-key/api-key.create.d.ts +15 -3
- package/script/commands/api-key/api-key.create.d.ts.map +1 -1
- package/script/commands/api-key/api-key.create.js +31 -11
- package/script/commands/api-key/api-key.delete.d.ts +1 -1
- package/script/commands/api-key/api-key.delete.d.ts.map +1 -1
- package/script/commands/api-key/api-key.delete.js +2 -2
- package/script/commands/api-key/api-key.list.d.ts +1 -1
- package/script/commands/api-key/api-key.list.d.ts.map +1 -1
- package/script/commands/api-key/api-key.list.js +2 -2
- package/script/commands/data-core/data-core.create.d.ts +6 -2
- package/script/commands/data-core/data-core.create.d.ts.map +1 -1
- package/script/commands/data-core/data-core.create.js +12 -0
- package/script/commands/data-core/data-core.delete-request.d.ts +6 -6
- package/script/commands/data-core/data-core.delete-request.d.ts.map +1 -1
- package/script/commands/data-core/data-core.delete-request.js +7 -7
- package/script/commands/data-core/data-core.fetch.d.ts +8 -4
- package/script/commands/data-core/data-core.fetch.d.ts.map +1 -1
- package/script/commands/data-core/data-core.fetch.js +12 -1
- package/script/commands/data-core/data-core.list.d.ts +2 -2
- package/script/commands/data-core/data-core.list.d.ts.map +1 -1
- package/script/commands/data-core/data-core.update.d.ts +3 -3
- package/script/commands/data-core/data-core.update.d.ts.map +1 -1
- package/script/commands/data-core/data-core.update.js +1 -1
- package/script/commands/event-type/event-type.create.d.ts +6 -2
- package/script/commands/event-type/event-type.create.d.ts.map +1 -1
- package/script/commands/event-type/event-type.create.js +12 -0
- package/script/commands/event-type/event-type.delete-request.d.ts +8 -4
- package/script/commands/event-type/event-type.delete-request.d.ts.map +1 -1
- package/script/commands/event-type/event-type.delete-request.js +13 -4
- package/script/commands/event-type/event-type.fetch.d.ts +7 -3
- package/script/commands/event-type/event-type.fetch.d.ts.map +1 -1
- package/script/commands/event-type/event-type.fetch.js +12 -1
- package/script/commands/event-type/event-type.list.d.ts +2 -2
- package/script/commands/event-type/event-type.list.d.ts.map +1 -1
- package/script/commands/event-type/event-type.update.d.ts +1 -1
- package/script/commands/event-type/event-type.update.d.ts.map +1 -1
- package/script/commands/event-type/event-type.update.js +2 -2
- package/script/commands/events/events.fetch-time-buckets-by-names.d.ts +1 -1
- package/script/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -1
- package/script/commands/events/events.fetch-time-buckets-by-names.js +2 -1
- package/script/commands/events/events.fetch.d.ts +1 -1
- package/script/commands/events/events.fetch.d.ts.map +1 -1
- package/script/commands/events/events.fetch.js +2 -2
- package/script/commands/flow-type/flow-type.create.d.ts +6 -2
- package/script/commands/flow-type/flow-type.create.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.create.js +12 -0
- package/script/commands/flow-type/flow-type.delete-request.d.ts +13 -6
- package/script/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.delete-request.js +13 -4
- package/script/commands/flow-type/flow-type.fetch.d.ts +9 -5
- package/script/commands/flow-type/flow-type.fetch.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.fetch.js +12 -1
- package/script/commands/flow-type/flow-type.list.d.ts +2 -2
- package/script/commands/flow-type/flow-type.list.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.update.d.ts +3 -3
- package/script/commands/flow-type/flow-type.update.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.update.js +1 -1
- package/script/commands/secret/secret.create.d.ts +1 -1
- package/script/commands/secret/secret.create.d.ts.map +1 -1
- package/script/commands/secret/secret.create.js +2 -2
- package/script/commands/secret/secret.delete.d.ts +1 -1
- package/script/commands/secret/secret.delete.d.ts.map +1 -1
- package/script/commands/secret/secret.delete.js +2 -3
- package/script/commands/secret/secret.list.d.ts +1 -1
- package/script/commands/secret/secret.list.d.ts.map +1 -1
- package/script/commands/secret/secret.list.js +2 -2
- package/script/commands/tenant/tenant.fetch.d.ts +5 -6
- package/script/commands/tenant/tenant.fetch.d.ts.map +1 -1
- package/script/commands/tenant/tenant.fetch.js +7 -5
- package/script/commands/tenant/tenant.list.d.ts +1 -1
- package/script/commands/tenant/tenant.list.d.ts.map +1 -1
- package/script/commands/tenant/tenant.list.js +2 -2
- package/script/commands/variable/variable.create.d.ts +1 -1
- package/script/commands/variable/variable.create.d.ts.map +1 -1
- package/script/commands/variable/variable.create.js +2 -2
- package/script/commands/variable/variable.delete.d.ts +1 -1
- package/script/commands/variable/variable.delete.d.ts.map +1 -1
- package/script/commands/variable/variable.delete.js +2 -2
- package/script/commands/variable/variable.list.d.ts +1 -1
- package/script/commands/variable/variable.list.d.ts.map +1 -1
- package/script/commands/variable/variable.list.js +2 -2
- package/script/common/command.d.ts +28 -6
- package/script/common/command.d.ts.map +1 -1
- package/script/common/command.js +43 -5
- package/script/common/flowcore-client.d.ts.map +1 -1
- package/script/common/flowcore-client.js +18 -11
- package/script/exceptions/not-found.d.ts +1 -1
- package/script/exceptions/not-found.d.ts.map +1 -1
- package/script/exceptions/not-found.js +2 -2
package/script/common/command.js
CHANGED
|
@@ -6,6 +6,15 @@ exports.GraphQlCommand = exports.Command = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
class Command {
|
|
8
8
|
constructor(input) {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the command should retry on failure
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: true
|
|
17
|
+
});
|
|
9
18
|
/**
|
|
10
19
|
* The allowed modes for the command
|
|
11
20
|
*/
|
|
@@ -48,18 +57,24 @@ class Command {
|
|
|
48
57
|
if (this.getMethod() === "GET") {
|
|
49
58
|
return undefined;
|
|
50
59
|
}
|
|
51
|
-
return this.input
|
|
60
|
+
return this.input ?? undefined;
|
|
52
61
|
}
|
|
53
62
|
/**
|
|
54
63
|
* Get the headers for the request
|
|
55
64
|
*/
|
|
56
65
|
getHeaders() {
|
|
57
|
-
return this.getBody()
|
|
66
|
+
return typeof this.getBody() === "object"
|
|
58
67
|
? {
|
|
59
68
|
"Content-Type": "application/json",
|
|
60
69
|
}
|
|
61
70
|
: {};
|
|
62
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Handle the client error
|
|
74
|
+
*/
|
|
75
|
+
handleClientError(error) {
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
63
78
|
/**
|
|
64
79
|
* Get the request object
|
|
65
80
|
*/
|
|
@@ -73,14 +88,16 @@ class Command {
|
|
|
73
88
|
path: this.getPath(),
|
|
74
89
|
method: this.getMethod(),
|
|
75
90
|
parseResponse: this.parseResponse.bind(this),
|
|
76
|
-
|
|
91
|
+
processResponse: this.processResponse.bind(this),
|
|
92
|
+
handleClientError: this.handleClientError.bind(this),
|
|
93
|
+
retryOnFailure: this.retryOnFailure,
|
|
77
94
|
};
|
|
78
95
|
}
|
|
79
96
|
/**
|
|
80
97
|
* Wait for the response
|
|
81
98
|
*/
|
|
82
99
|
// deno-lint-ignore require-await
|
|
83
|
-
async
|
|
100
|
+
async processResponse(_client, response) {
|
|
84
101
|
return response;
|
|
85
102
|
}
|
|
86
103
|
}
|
|
@@ -89,8 +106,29 @@ exports.Command = Command;
|
|
|
89
106
|
* Abstract command for executing GraphQL requests
|
|
90
107
|
*/
|
|
91
108
|
class GraphQlCommand extends Command {
|
|
109
|
+
constructor() {
|
|
110
|
+
super(...arguments);
|
|
111
|
+
/**
|
|
112
|
+
* The allowed modes for the command
|
|
113
|
+
*/
|
|
114
|
+
Object.defineProperty(this, "allowedModes", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
configurable: true,
|
|
117
|
+
writable: true,
|
|
118
|
+
value: ["bearer"]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get the base URL for the request
|
|
123
|
+
*/
|
|
92
124
|
getBaseUrl() {
|
|
93
|
-
return "https://graph.api.flowcore.io
|
|
125
|
+
return "https://graph.api.flowcore.io";
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Get the path for the request
|
|
129
|
+
*/
|
|
130
|
+
getPath() {
|
|
131
|
+
return "/graphql";
|
|
94
132
|
}
|
|
95
133
|
}
|
|
96
134
|
exports.GraphQlCommand = GraphQlCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowcore-client.d.ts","sourceRoot":"","sources":["../../src/common/flowcore-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAI3C;;GAEG;AACH,UAAU,mBAAmB;IAC3B,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,KAAK,CAAA;IACtB,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,mBAAmB,CAAA;AAErE;;GAEG;AACH,qBAAa,cAAc;IAIb,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,OAAO,CAAoB;gBAEN,OAAO,EAAE,aAAa;IAiBnD;;OAEG;YACW,aAAa;IAc3B;;OAEG;YACW,YAAY;
|
|
1
|
+
{"version":3,"file":"flowcore-client.d.ts","sourceRoot":"","sources":["../../src/common/flowcore-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAI3C;;GAEG;AACH,UAAU,mBAAmB;IAC3B,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,KAAK,CAAA;IACtB,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,mBAAmB,CAAA;AAErE;;GAEG;AACH,qBAAa,cAAc;IAIb,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,OAAO,CAAoB;gBAEN,OAAO,EAAE,aAAa;IAiBnD;;OAEG;YACW,aAAa;IAc3B;;OAEG;YACW,YAAY;IAiE1B;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;CAGzE"}
|
|
@@ -68,20 +68,25 @@ class FlowcoreClient {
|
|
|
68
68
|
throw new command_error_js_1.CommandError(command.constructor.name, `Not allowed in "${this.mode}" mode`);
|
|
69
69
|
}
|
|
70
70
|
const authHeader = await this.getAuthHeader();
|
|
71
|
+
const headers = {
|
|
72
|
+
...request.headers,
|
|
73
|
+
...(authHeader ? { Authorization: authHeader } : {}),
|
|
74
|
+
};
|
|
71
75
|
let response;
|
|
72
76
|
const url = this.baseUrl ? this.baseUrl + request.path : request.baseUrl + request.path;
|
|
77
|
+
let body;
|
|
78
|
+
if (typeof request.body === "object") {
|
|
79
|
+
body = JSON.stringify(request.body);
|
|
80
|
+
}
|
|
73
81
|
try {
|
|
74
82
|
response = await fetch(url, {
|
|
75
83
|
method: request.method,
|
|
76
|
-
headers
|
|
77
|
-
|
|
78
|
-
...(authHeader ? { Authorization: authHeader } : {}),
|
|
79
|
-
},
|
|
80
|
-
body: request.body,
|
|
84
|
+
headers,
|
|
85
|
+
body,
|
|
81
86
|
});
|
|
82
87
|
}
|
|
83
88
|
catch (error) {
|
|
84
|
-
if (this.options.retry && retryCount < this.options.retry.maxRetries) {
|
|
89
|
+
if (request.retryOnFailure && this.options.retry && retryCount < this.options.retry.maxRetries) {
|
|
85
90
|
const delay = this.options.retry.delay;
|
|
86
91
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
87
92
|
return this.innerExecute(command, retryCount + 1);
|
|
@@ -93,7 +98,8 @@ class FlowcoreClient {
|
|
|
93
98
|
});
|
|
94
99
|
}
|
|
95
100
|
if (!response.ok) {
|
|
96
|
-
if (
|
|
101
|
+
if (request.retryOnFailure &&
|
|
102
|
+
this.options.retry && RETRYABLE_ERROR_CODES.includes(response.status) &&
|
|
97
103
|
retryCount < this.options.retry.maxRetries) {
|
|
98
104
|
const delay = this.options.retry.delay;
|
|
99
105
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
@@ -101,11 +107,12 @@ class FlowcoreClient {
|
|
|
101
107
|
}
|
|
102
108
|
const body = await response.json().catch(() => undefined);
|
|
103
109
|
const commandName = command.constructor.name;
|
|
104
|
-
|
|
110
|
+
const error = new client_error_js_1.ClientError(`${commandName} failed with ${response.status}: ${response.statusText}`, response.status, body);
|
|
111
|
+
request.handleClientError(error);
|
|
105
112
|
}
|
|
106
|
-
const
|
|
107
|
-
const parsedBody = await request.parseResponse(
|
|
108
|
-
return request.
|
|
113
|
+
const responseBody = await response.json();
|
|
114
|
+
const parsedBody = await request.parseResponse(responseBody);
|
|
115
|
+
return request.processResponse(this, parsedBody);
|
|
109
116
|
}
|
|
110
117
|
/**
|
|
111
118
|
* Override the base URL for all commands
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not-found.d.ts","sourceRoot":"","sources":["../../src/exceptions/not-found.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"not-found.d.ts","sourceRoot":"","sources":["../../src/exceptions/not-found.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAG9D"}
|
|
@@ -5,8 +5,8 @@ exports.NotFoundException = void 0;
|
|
|
5
5
|
* An error thrown when a resource is not found
|
|
6
6
|
*/
|
|
7
7
|
class NotFoundException extends Error {
|
|
8
|
-
constructor(resource,
|
|
9
|
-
super(`${resource}
|
|
8
|
+
constructor(resource, filters) {
|
|
9
|
+
super(`${resource} not found: ${JSON.stringify(filters)}`);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.NotFoundException = NotFoundException;
|