Add descriptive error messages across all API routes and toast notifications on client pages
Build & Auto-Repair / build (push) Has been cancelled
Build & Auto-Repair / build (push) Has been cancelled
- 86 catch blocks in 49 API route files now return the actual error message via error.message
- 14 campaign/lead/config catch blocks that lacked console.error now log errors
- 17 client pages/components now show toast.error notifications on API failures
- Silent .catch(() => {}) and finally-only try blocks now surface errors to users
This commit is contained in:
@@ -141,8 +141,9 @@ export async function POST(request: NextRequest) {
|
||||
return response
|
||||
} catch (error) {
|
||||
console.error("Login error:", error)
|
||||
const message = error instanceof Error ? error.message : "Authentication service unavailable."
|
||||
return NextResponse.json(
|
||||
{ error: "Authentication service unavailable." },
|
||||
{ error: message },
|
||||
{ status: 503 }
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user