@@ -43,7 +43,7 @@ export const getCurationSketches = async (
43
43
const response = await fetch (
44
44
`${ openProcessingEndpoint } curation/${ curationId } /sketches?${ limitParam } ` ,
45
45
) ;
46
- if ( ! response . ok ) {
46
+ if ( ! response . ok ) { //log error instead of throwing error to not cache result in memoize
47
47
console . log ( 'getCurationSketches' , response . status , response . statusText )
48
48
}
49
49
const payload = await response . json ( ) ;
@@ -81,7 +81,7 @@ export const getSketch = memoize(async (
81
81
id : string ,
82
82
) : Promise < OpenProcessingSketchResponse > => {
83
83
const response = await fetch ( `${ openProcessingEndpoint } sketch/${ id } ` ) ;
84
- if ( ! response . ok ) {
84
+ if ( ! response . ok ) { //log error instead of throwing error to not cache result in memoize
85
85
console . log ( 'getSketch' , id , response . status , response . statusText )
86
86
}
87
87
const payload = await response . json ( ) ;
@@ -95,6 +95,9 @@ export const getSketchSize = memoize(async (id: string) => {
95
95
}
96
96
97
97
const response = await fetch ( `${ openProcessingEndpoint } sketch/${ id } /code` ) ;
98
+ if ( ! response . ok ) { //log error instead of throwing error to not cache result in memoize
99
+ console . log ( 'getSketchSize' , id , response . status , response . statusText )
100
+ }
98
101
const payload = await response . json ( ) ;
99
102
100
103
for ( const tab of payload ) {
0 commit comments