File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -190,17 +190,22 @@ export default async function readmeAPIFetch(
190
190
...options ,
191
191
headers,
192
192
dispatcher : proxy ? new ProxyAgent ( proxy ) : undefined ,
193
- } ) . then ( res => {
194
- const warningHeader = res . headers . get ( 'Warning' ) ;
195
- if ( warningHeader ) {
196
- debug ( `received warning header: ${ warningHeader } ` ) ;
197
- const warnings = parseWarningHeader ( warningHeader ) ;
198
- warnings . forEach ( warning => {
199
- warn ( warning . message , 'ReadMe API Warning:' ) ;
200
- } ) ;
201
- }
202
- return res ;
203
- } ) ;
193
+ } )
194
+ . then ( res => {
195
+ const warningHeader = res . headers . get ( 'Warning' ) ;
196
+ if ( warningHeader ) {
197
+ debug ( `received warning header: ${ warningHeader } ` ) ;
198
+ const warnings = parseWarningHeader ( warningHeader ) ;
199
+ warnings . forEach ( warning => {
200
+ warn ( warning . message , 'ReadMe API Warning:' ) ;
201
+ } ) ;
202
+ }
203
+ return res ;
204
+ } )
205
+ . catch ( e => {
206
+ debug ( `error making fetch request: ${ e } ` ) ;
207
+ throw e ;
208
+ } ) ;
204
209
}
205
210
206
211
/**
You can’t perform that action at this time.
0 commit comments