Skip to content

Commit 803e055

Browse files
Update app/api/upload/route.ts
Co-authored-by: Copilot <[email protected]>
1 parent 64d4c6e commit 803e055

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/api/upload/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cloudinary.config({
1414
async function cloudinaryToSVG(imageUrl: string) {
1515
const svgString: string = await new Promise((resolve, reject) => {
1616
potrace.posterize(imageUrl, (err: unknown, svg: string) => {
17-
if (err) return reject(err);
17+
if (err) return reject(new Error(`Failed to convert image to SVG: ${(err as Error)?.message}`));
1818
resolve(svg);
1919
});
2020
});

0 commit comments

Comments
 (0)