From efb84b306389f82ff0b5d0631e20020a62d7d6d9 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 30 Dec 2024 15:59:01 +0700 Subject: [PATCH] Add back ValidationError --- gns3server/services/authentication.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gns3server/services/authentication.py b/gns3server/services/authentication.py index 477c24a8..c9bfaa56 100644 --- a/gns3server/services/authentication.py +++ b/gns3server/services/authentication.py @@ -24,6 +24,7 @@ from typing import Optional from fastapi import HTTPException, status from gns3server.schemas.controller.tokens import TokenData from gns3server.config import Config +from pydantic import ValidationError import logging @@ -80,6 +81,6 @@ class AuthService: if username is None: raise credentials_exception token_data = TokenData(username=username) - except (JoseError, ValueError): + except (JoseError, ValidationError, ValueError): raise credentials_exception return token_data.username