exibição completa do motivo do erro de unauthorized
This commit is contained in:
@@ -46,9 +46,11 @@ def get_current_user(credentials: HTTPAuthorizationCredentials = Depends(securit
|
||||
detail="Invalid access token",
|
||||
headers={"WWW-Authenticate": "Bearer"},
|
||||
)
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
import traceback
|
||||
traceback.print_exc() # Imprime no log do docker para ajudar a debugar
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail="Could not validate credentials",
|
||||
detail=f"Could not validate credentials: {str(e)}",
|
||||
headers={"WWW-Authenticate": "Bearer"},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user