Dev fixes silent auth redirect failure and FK mismatch in Next.js/NestJS monorepo
A developer working on a Next.js and NestJS monorepo identified two critical bugs that surfaced in production HAR logs on August 28, 2026. The first issue involved AuthGuard using router.replace() for expired JWT redirects, which failed silently in Next 13's app router when components unmounted, leaving users stuck on broken pages. The fix replaced the unreliable client-side navigation with Next 13's server-side redirect() helper, ensuring a proper HTTP 302 response before any client code runs. The second bug was a foreign-key typo in the sales-pipeline database table that referenced the wrong table name, causing empty pipeline lists despite data being present. Correcting the schema and regenerating the ORM resolved both issues, eliminating hidden 401 and 404 errors that the frontend had been silently swallowing.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in