@@ -43,7 +43,7 @@ export const getCurationSketches = async (
4343 const response = await fetch (
4444 `${ openProcessingEndpoint } curation/${ curationId } /sketches?${ limitParam } ` ,
4545 ) ;
46- if ( ! response . ok ) {
46+ if ( ! response . ok ) { //log error instead of throwing error to not cache result in memoize
4747 console . log ( 'getCurationSketches' , response . status , response . statusText )
4848 }
4949 const payload = await response . json ( ) ;
@@ -81,7 +81,7 @@ export const getSketch = memoize(async (
8181 id : string ,
8282) : Promise < OpenProcessingSketchResponse > => {
8383 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
8585 console . log ( 'getSketch' , id , response . status , response . statusText )
8686 }
8787 const payload = await response . json ( ) ;
@@ -95,6 +95,9 @@ export const getSketchSize = memoize(async (id: string) => {
9595 }
9696
9797 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+ }
98101 const payload = await response . json ( ) ;
99102
100103 for ( const tab of payload ) {
0 commit comments