We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8727a34 commit 7af3716Copy full SHA for 7af3716
lib/aws4fetch.ts
@@ -87,7 +87,7 @@ export class AwsClient {
87
this.region = region;
88
/** @type {Map<string, ArrayBuffer>} */
89
this.cache = cache || new Map();
90
- this.retries = retries != null ? retries : 2; // Up to 25.6 secs
+ this.retries = retries != null ? retries : 0; // Up to 25.6 secs
91
this.initRetryMs = initRetryMs || 50;
92
}
93
plugins/03.s3.ts
@@ -64,6 +64,11 @@ export default defineNuxtPlugin({
64
if (error?.$metadata?.httpStatusCode === 401) {
65
await useAuth().logoutAndRedirect();
66
67
+
68
+ // 处理 S3 客户端错误,优先抛出 error.message 作为新的 Error
69
+ if (error?.Code) {
70
+ throw new Error(error.Code);
71
+ }
72
throw error;
73
74
},
0 commit comments