getMessage()) { case "Failed": throw new Exception("Login failed", 500); case "NotFound": throw new Exception("User not Found", 404); case "Invalid": throw new Exception("Invalid Username or Password", 401); } } } }