File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ export async function newPage(poolResource) {
244244
245245 // Throw an error in case of no connected browser
246246 if ( ! browser || ! browser . connected ) {
247- throw new ExportError ( `[browser] Browser is not yet connected.` , 400 ) ;
247+ throw new ExportError ( `[browser] Browser is not yet connected.` , 500 ) ;
248248 }
249249
250250 // Create a page
Original file line number Diff line number Diff line change @@ -140,7 +140,8 @@ export const fetchAndProcessScript = async (
140140
141141 if ( shouldThrowError ) {
142142 throw new ExportError (
143- `Could not fetch the ${ script } .js. The script might not exist in the requested version (status code: ${ response . statusCode } ).`
143+ `Could not fetch the ${ script } .js. The script might not exist in the requested version (status code: ${ response . statusCode } ).` ,
144+ 500
144145 ) . setError ( response ) ;
145146 } else {
146147 log (
@@ -186,9 +187,10 @@ export const fetchScripts = async (
186187 port : proxyPort
187188 } ) ;
188189 } catch ( error ) {
189- throw new ExportError ( '[cache] Could not create a Proxy Agent.' ) . setError (
190- error
191- ) ;
190+ throw new ExportError (
191+ '[cache] Could not create a Proxy Agent.' ,
192+ 500
193+ ) . setError ( error ) ;
192194 }
193195 }
194196
@@ -270,7 +272,8 @@ export const updateCache = async (
270272 return fetchedModules ;
271273 } catch ( error ) {
272274 throw new ExportError (
273- '[cache] Unable to update the local Highcharts cache.'
275+ '[cache] Unable to update the local Highcharts cache.' ,
276+ 500
274277 ) . setError ( error ) ;
275278 }
276279} ;
You can’t perform that action at this time.
0 commit comments