Skip to content

Commit 9d48a44

Browse files
committed
minimal error handling with no return value for errors
1 parent 03093c4 commit 9d48a44

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/api/OpenProcessing.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ export const getCurationSketches = async (
4343
const response = await fetch(
4444
`${openProcessingEndpoint}curation/${curationId}/sketches?${limitParam}`,
4545
);
46+
if(!response.ok){
47+
console.log('getCurationSketches', response.status, response.statusText)
48+
}
4649
const payload = await response.json();
4750
return payload as OpenProcessingCurationResponse;
4851
};
@@ -78,6 +81,9 @@ export const getSketch = memoize(async (
7881
id: string,
7982
): Promise<OpenProcessingSketchResponse> => {
8083
const response = await fetch(`${openProcessingEndpoint}sketch/${id}`);
84+
if(!response.ok){
85+
console.log('getSketch', id, response.status, response.statusText)
86+
}
8187
const payload = await response.json();
8288
return payload as OpenProcessingSketchResponse;
8389
});

0 commit comments

Comments
 (0)