@@ -64,8 +64,6 @@ type APIRelease = {
6464 version : string ;
6565} ;
6666
67- const TIMEOUT = { signal : AbortSignal . timeout ( 5000 ) } ;
68-
6967async function error ( url : string , resp : Response ) : Promise < Error > {
7068 const body = await resp . text ( ) ;
7169 return Error ( `GET ${ url } : ${ resp . statusText } | ${ body } ` ) ;
@@ -87,7 +85,7 @@ const ShareAPI = {
8785 getProfile : async ( handle : string ) : Promise < APIProfile > => {
8886 const url = `${ ShareAPI . baseURL } /users/${ apiHandle ( handle ) } ` ;
8987
90- return fetch ( url , TIMEOUT ) . then ( async ( resp ) => {
88+ return fetch ( url ) . then ( async ( resp ) => {
9189 if ( ! resp . ok ) {
9290 throw await error ( url , resp ) ;
9391 }
@@ -102,7 +100,7 @@ const ShareAPI = {
102100 ) : Promise < APIProject > => {
103101 const url = ShareAPI . projectBaseUrl ( handle , projectSlug ) ;
104102
105- return fetch ( url , TIMEOUT ) . then ( async ( resp ) => {
103+ return fetch ( url ) . then ( async ( resp ) => {
106104 if ( ! resp . ok ) {
107105 throw await error ( url , resp ) ;
108106 }
@@ -121,7 +119,7 @@ const ShareAPI = {
121119 projectSlug ,
122120 `/contributions/${ contribRef } ` ,
123121 ) ;
124- return fetch ( url , TIMEOUT ) . then ( async ( resp ) => {
122+ return fetch ( url ) . then ( async ( resp ) => {
125123 if ( ! resp . ok ) {
126124 throw await error ( url , resp ) ;
127125 }
@@ -140,7 +138,7 @@ const ShareAPI = {
140138 projectSlug ,
141139 `/tickets/${ ticketRef } ` ,
142140 ) ;
143- return fetch ( url , TIMEOUT ) . then ( async ( resp ) => {
141+ return fetch ( url ) . then ( async ( resp ) => {
144142 if ( ! resp . ok ) {
145143 throw await error ( url , resp ) ;
146144 }
@@ -160,7 +158,7 @@ const ShareAPI = {
160158 `/releases/${ version } ` ,
161159 ) ;
162160
163- return fetch ( url , TIMEOUT ) . then ( async ( resp ) => {
161+ return fetch ( url ) . then ( async ( resp ) => {
164162 if ( ! resp . ok ) {
165163 throw await error ( url , resp ) ;
166164 }
@@ -188,7 +186,7 @@ const ShareAPI = {
188186 url = mkUrl ( branchRef ) ;
189187 }
190188
191- return fetch ( url , TIMEOUT ) . then ( async ( resp ) => {
189+ return fetch ( url ) . then ( async ( resp ) => {
192190 if ( ! resp . ok ) {
193191 throw await error ( url , resp ) ;
194192 }
0 commit comments