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 803e055 commit cebd422Copy full SHA for cebd422
app/api/upload/route.ts
@@ -14,7 +14,12 @@ 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(new Error(`Failed to convert image to SVG: ${(err as Error)?.message}`));
+ if (err)
18
+ return reject(
19
+ new Error(
20
+ `Failed to convert image to SVG: ${(err as Error)?.message}`,
21
+ ),
22
+ );
23
resolve(svg);
24
});
25
0 commit comments