@openfn/language-msgraph 0.3.0 → 0.3.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/dist/index.cjs +5 -2
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -119,7 +119,7 @@ function handleResponseError(response, data, method) {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
var request = async (urlString, params = {}, method = "GET") => {
|
|
122
|
-
let url;
|
|
122
|
+
let url = urlString;
|
|
123
123
|
const defaultHeaders = { "Content-Type": "application/json" };
|
|
124
124
|
const { headers } = params;
|
|
125
125
|
const setHeaders = { ...headers, ...defaultHeaders };
|
|
@@ -156,7 +156,10 @@ function execute(...operations) {
|
|
|
156
156
|
return (0, import_language_common2.execute)(...operations)({
|
|
157
157
|
...initialState,
|
|
158
158
|
...state
|
|
159
|
-
}).then(cleanup).catch(
|
|
159
|
+
}).then(cleanup).catch((error) => {
|
|
160
|
+
cleanup(state);
|
|
161
|
+
throw error;
|
|
162
|
+
});
|
|
160
163
|
};
|
|
161
164
|
}
|
|
162
165
|
function create(resource, data, callback) {
|
package/dist/index.js
CHANGED
|
@@ -82,7 +82,7 @@ function handleResponseError(response, data, method) {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
var request = async (urlString, params = {}, method = "GET") => {
|
|
85
|
-
let url;
|
|
85
|
+
let url = urlString;
|
|
86
86
|
const defaultHeaders = { "Content-Type": "application/json" };
|
|
87
87
|
const { headers } = params;
|
|
88
88
|
const setHeaders = { ...headers, ...defaultHeaders };
|
|
@@ -131,7 +131,10 @@ function execute(...operations) {
|
|
|
131
131
|
return commonExecute(...operations)({
|
|
132
132
|
...initialState,
|
|
133
133
|
...state
|
|
134
|
-
}).then(cleanup).catch(
|
|
134
|
+
}).then(cleanup).catch((error) => {
|
|
135
|
+
cleanup(state);
|
|
136
|
+
throw error;
|
|
137
|
+
});
|
|
135
138
|
};
|
|
136
139
|
}
|
|
137
140
|
function create(resource, data, callback) {
|