mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
fix response error return type
This commit is contained in:
parent
460200dfef
commit
8083482ba8
12 changed files with 23 additions and 25 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue