From 830bdd1f8dd51cd200f127ac2a007ab05ec590e0 Mon Sep 17 00:00:00 2001 From: James Hilton-Balfe Date: Sun, 14 Apr 2024 01:42:35 +0100 Subject: [PATCH] Update error to include cause --- apps/anvil/src/auth/authentication/authentication.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/anvil/src/auth/authentication/authentication.controller.ts b/apps/anvil/src/auth/authentication/authentication.controller.ts index 0e05d8f..d56ec99 100644 --- a/apps/anvil/src/auth/authentication/authentication.controller.ts +++ b/apps/anvil/src/auth/authentication/authentication.controller.ts @@ -85,7 +85,7 @@ export class AuthenticationController { try { await this.blacklistService.addToBlacklist(refreshToken, expiryDate); } catch (error) { - throw new ConflictException("Refresh token is invalid or expired"); + throw new ConflictException({ message: "Refresh token is invalid or expired" }, { cause: error }); } this.authService.clearAuthCookies(res);