From 95627003e559dd94f1d0a3213f46fc3ff7a44aa4 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Mon, 4 Nov 2024 03:14:17 +0300 Subject: [PATCH] refactor: change the error --- Endpoint/Controllers/V1/AuthController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Endpoint/Controllers/V1/AuthController.cs b/Endpoint/Controllers/V1/AuthController.cs index 075f298..2fb1e7a 100644 --- a/Endpoint/Controllers/V1/AuthController.cs +++ b/Endpoint/Controllers/V1/AuthController.cs @@ -43,7 +43,7 @@ public class AuthController(IOptionsSnapshot user, AuthService auth, Pass if (!userEntity.Username.Equals(request.Username, StringComparison.OrdinalIgnoreCase) && !userEntity.Email.Equals(request.Username, StringComparison.OrdinalIgnoreCase)) - return BadRequest("Invalid username/email or password"); + return Unauthorized("Authentication failed. Please check your credentials."); var tokenResult = await auth.LoginAsync( GetCookieParams(),