mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-28 03:07:25 +00:00
Fix validation error causing 400 response
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/d4a37844-692f-4de3-b9be-1b0c92eb2eb5.jpg
This commit is contained in:
@@ -997,6 +997,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
|||||||
res.status(201).json(token);
|
res.status(201).json(token);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof z.ZodError) {
|
if (error instanceof z.ZodError) {
|
||||||
|
console.log("API Token Validation error details:", JSON.stringify(error.errors, null, 2));
|
||||||
res.status(400).json({ message: "Validation error", errors: error.errors });
|
res.status(400).json({ message: "Validation error", errors: error.errors });
|
||||||
} else {
|
} else {
|
||||||
console.error("Error creating API token:", error);
|
console.error("Error creating API token:", error);
|
||||||
|
|||||||
Reference in New Issue
Block a user