mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
fix: should return null when getting blob fails (#4360)
This commit is contained in:
@@ -15,7 +15,13 @@ export const createCloudBlobStorage = (workspaceId: string): BlobStorage => {
|
||||
return fetchWithTraceReport(
|
||||
runtimeConfig.serverUrlPrefix +
|
||||
`/api/workspaces/${workspaceId}/blobs/${key}`
|
||||
).then(res => res.blob());
|
||||
).then(res => {
|
||||
if (!res.ok) {
|
||||
// status not in the range 200-299
|
||||
return null;
|
||||
}
|
||||
return res.blob();
|
||||
});
|
||||
},
|
||||
set: async (key, value) => {
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user