We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64d4c6e commit 803e055Copy full SHA for 803e055
app/api/upload/route.ts
@@ -14,7 +14,7 @@ cloudinary.config({
14
async function cloudinaryToSVG(imageUrl: string) {
15
const svgString: string = await new Promise((resolve, reject) => {
16
potrace.posterize(imageUrl, (err: unknown, svg: string) => {
17
- if (err) return reject(err);
+ if (err) return reject(new Error(`Failed to convert image to SVG: ${(err as Error)?.message}`));
18
resolve(svg);
19
});
20
0 commit comments