Skip to content

Commit fdc48ee

Browse files
committed
Don't retry on 401
1 parent ea07ae6 commit fdc48ee

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/progressive-video-uploader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ export class ProgressiveUploader {
151151
response = await doUpload(thisPart);
152152
resolve(response);
153153
return;
154-
} catch (e) {
155-
if(retriesCount >= this.retries) {
154+
} catch (e: any) {
155+
if(e.status !== 401 && retriesCount >= this.retries) {
156156
reject(e);
157157
return;
158158
}

src/video-uploader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ export class VideoUploader {
102102
this.videoId = response.videoId;
103103
this.currentChunk++;
104104

105-
} catch (e) {
106-
if (retriesCount >= this.retries) {
105+
} catch (e: any) {
106+
if (e.status === 401 || retriesCount >= this.retries) {
107107
reject(e);
108108
return;
109109
}

0 commit comments

Comments
 (0)