@tinycloud/operations 0.3.3-beta.11 → 0.3.3-beta.13
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/artifacts.cjs +10 -9
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.d.cts +30 -30
- package/dist/artifacts.d.ts +30 -30
- package/dist/artifacts.js +10 -9
- package/dist/artifacts.js.map +1 -1
- package/dist/cli-runtime.cjs +10 -9
- package/dist/cli-runtime.cjs.map +1 -1
- package/dist/cli-runtime.js +10 -9
- package/dist/cli-runtime.js.map +1 -1
- package/dist/index.cjs +10 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3618,16 +3618,17 @@ var init_dist2 = __esm({
|
|
|
3618
3618
|
...options?.ifNoneMatch === void 0 ? {} : { "if-none-match": options.ifNoneMatch }
|
|
3619
3619
|
}
|
|
3620
3620
|
);
|
|
3621
|
+
if (response.status === 401 || response.status === 403) {
|
|
3622
|
+
const errorText = await response.text();
|
|
3623
|
+
const message = errorText.trim().length > 0 ? errorText : `Failed to put key "${key}": ${response.status} - ${response.statusText || "authorization failed"}`;
|
|
3624
|
+
const { resource, action: requiredAction } = parseAuthError(errorText);
|
|
3625
|
+
return err(authUnauthorizedError("kv", message, {
|
|
3626
|
+
status: response.status,
|
|
3627
|
+
...requiredAction && { requiredAction },
|
|
3628
|
+
...resource && { resource }
|
|
3629
|
+
}));
|
|
3630
|
+
}
|
|
3621
3631
|
if (!response.ok) {
|
|
3622
|
-
if (response.status === 401) {
|
|
3623
|
-
const errorText2 = await response.text();
|
|
3624
|
-
const { resource, action } = parseAuthError(errorText2);
|
|
3625
|
-
return err(authUnauthorizedError("kv", errorText2, {
|
|
3626
|
-
status: response.status,
|
|
3627
|
-
...action && { requiredAction: action },
|
|
3628
|
-
...resource && { resource }
|
|
3629
|
-
}));
|
|
3630
|
-
}
|
|
3631
3632
|
const errorText = await response.text();
|
|
3632
3633
|
if (response.status === 412) {
|
|
3633
3634
|
return err(serviceError(
|