fix response error return type
This commit is contained in:
1 parent
460200dfef
commit
8083482ba8
12 files changed
+23
-25
No files matched your search
@@ -55,7 +55,7 @@ export async function POST(
|
||||
return Response.json(website);
|
||||
} catch (e: any) {
|
||||
if (e.message.toLowerCase().includes('unique constraint') && e.message.includes('share_id')) {
|
||||
return badRequest('That share ID is already taken.');
|
||||
return badRequest({ message: 'That share ID is already taken.' });
|
||||
}
|
||||
|
||||
return serverError(e);
|
||||
|
||||
Reference in new issue
Block a user