Coverage for backend \ app \ configuracionGeneral \ errores.py: 100.00%
7 statements
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-29 16:13 -0500
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-29 16:13 -0500
1from fastapi import status
3class ErrorBase:
4 def __init__(self, codigoHttp: int, mensaje: str):
5 self.codigoHttp = codigoHttp
6 self.mensaje = mensaje
8# JWT / Autenticación
9ERROR_TOKEN_INVALIDO = ErrorBase(
10 status.HTTP_401_UNAUTHORIZED,
11 "Token inválido o expirado"
12)
14# Negocio
15ERROR_CREDENCIALES = ErrorBase(
16 status.HTTP_401_UNAUTHORIZED,
17 "Credenciales incorrectas"
18)