feat: fallback to unsplash cover when article contains no image
This commit is contained in:
@@ -106,8 +106,11 @@ export async function createResource(
|
||||
body: isJson ? JSON.stringify(content) : content,
|
||||
});
|
||||
if (!response.ok) {
|
||||
const text = await response.text();
|
||||
throw new Error(
|
||||
`Failed to create resource (resources/${path}) : ${response.status}`,
|
||||
`failed to create resource (resources/${path}): ${
|
||||
text || response.status
|
||||
}`,
|
||||
);
|
||||
}
|
||||
return response.json();
|
||||
|
||||
Reference in New Issue
Block a user