@@ -36,19 +36,19 @@ export type OpenProcessingCurationResponse = Array<{
3636 * @param limit max number of sketches to return
3737 * @returns sketches
3838 */
39- export const getCurationSketches = async (
39+ export const getCurationSketches = memoize ( async (
4040 limit ?: number ,
4141) : Promise < OpenProcessingCurationResponse > => {
4242 const limitParam = limit ? `limit=${ limit } ` : "" ;
4343 const response = await fetch (
4444 `${ openProcessingEndpoint } curation/${ curationId } /sketches?${ limitParam } ` ,
4545 ) ;
4646 if ( ! response . ok ) { //log error instead of throwing error to not cache result in memoize
47- console . log ( 'getCurationSketches' , response . status , response . statusText )
47+ console . error ( 'getCurationSketches' , response . status , response . statusText )
4848 }
4949 const payload = await response . json ( ) ;
5050 return payload as OpenProcessingCurationResponse ;
51- } ;
51+ } ) ;
5252
5353/**
5454 * API Response from a call to the Sketch endpoint
@@ -82,7 +82,7 @@ export const getSketch = memoize(async (
8282) : Promise < OpenProcessingSketchResponse > => {
8383 const response = await fetch ( `${ openProcessingEndpoint } sketch/${ id } ` ) ;
8484 if ( ! response . ok ) { //log error instead of throwing error to not cache result in memoize
85- console . log ( 'getSketch' , id , response . status , response . statusText )
85+ console . error ( 'getSketch' , id , response . status , response . statusText )
8686 }
8787 const payload = await response . json ( ) ;
8888 return payload as OpenProcessingSketchResponse ;
@@ -96,7 +96,7 @@ export const getSketchSize = memoize(async (id: string) => {
9696
9797 const response = await fetch ( `${ openProcessingEndpoint } sketch/${ id } /code` ) ;
9898 if ( ! response . ok ) { //log error instead of throwing error to not cache result in memoize
99- console . log ( 'getSketchSize' , id , response . status , response . statusText )
99+ console . error ( 'getSketchSize' , id , response . status , response . statusText )
100100 }
101101 const payload = await response . json ( ) ;
102102
0 commit comments