Code cleanup

This commit is contained in:
Dominic Ferrando
2026-10-03 23:49:16 -04:00
parent 7afde2c323
commit 9bf60b7c8b
8 changed files with 112 additions and 66 deletions
+7 -1
View File
@@ -25,7 +25,13 @@ export class PrintfulError extends Error {
public status: number = 502
) {
super(message);
this.name = "PrintfulError";
}
toResponse() {
return new Response(JSON.stringify({ error: this.message }), {
status: this.status,
headers: { 'content-type': 'application/json' }
})
}
}
+7 -1
View File
@@ -32,7 +32,13 @@ export class WebflowError extends Error {
public status: number = 502
) {
super(message);
this.name = "WebflowError";
}
toResponse() {
return new Response(JSON.stringify({ error: this.message }), {
status: this.status,
headers: { 'content-type': 'application/json' }
})
}
}