File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,20 @@ export const steps = ({
5656 step . title ,
5757 )
5858 if ( match === null ) return noMatch
59- const res = await ( await fetch ( match ?. groups ?. url ?? '' ) ) . json ( )
60- debug ( res )
61- check ( res ) . is ( objectMatching ( JSON . parse ( codeBlockOrThrow ( step ) . code ) ) )
59+ const res = await fetch ( match ?. groups ?. url ?? '' )
60+ res . headers . forEach ( ( v , k ) => debug ( `${ v } : ${ k } ` ) )
61+ const body = await res . text ( )
62+ debug ( body )
63+ let registry : Record < string , any > = { }
64+ try {
65+ registry = JSON . parse ( body )
66+ } catch {
67+ throw new Error ( `Failed to parse body as JSON: ${ body } ` )
68+ }
69+ check ( registry ) . is (
70+ objectMatching ( JSON . parse ( codeBlockOrThrow ( step ) . code ) ) ,
71+ )
72+ return registry
6273 } ,
6374 ] ,
6475 cleanup : async ( ) => {
Original file line number Diff line number Diff line change 11---
22retry :
3- initialDelay : 1000
3+ initialDelay : 5000
44---
55
66# Get Parameters
You can’t perform that action at this time.
0 commit comments