Add backend error logging and increase frontend timeout

This commit is contained in:
2026-02-25 11:49:42 -05:00
parent a9097b82d2
commit 9b9d788ca7
17 changed files with 660 additions and 5 deletions

View File

@ -128,6 +128,15 @@ app.add_middleware(
allow_headers=["*"], allow_headers=["*"],
) )
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
@app.exception_handler(Exception)
async def global_exception_handler(request, exc):
logger.error(f"Global error: {exc}", exc_info=True)
return {"detail": "Internal Server Error", "message": str(exc)}
# Ensure upload directories exist # Ensure upload directories exist
for sub in ["profiles", "vehicles", "businesses"]: for sub in ["profiles", "vehicles", "businesses"]:
os.makedirs(os.path.join("uploads", sub), exist_ok=True) os.makedirs(os.path.join("uploads", sub), exist_ok=True)

0
frontend/error_build.txt Normal file
View File

BIN
frontend/error_clean.txt Normal file

Binary file not shown.

BIN
frontend/error_err.txt Normal file

Binary file not shown.

BIN
frontend/error_full.txt Normal file

Binary file not shown.

0
frontend/error_out.txt Normal file
View File

BIN
frontend/error_ps.txt Normal file

Binary file not shown.

BIN
frontend/error_report.txt Normal file

Binary file not shown.

BIN
frontend/error_v.txt Normal file

Binary file not shown.

BIN
frontend/error_v2.txt Normal file

Binary file not shown.

BIN
frontend/error_v3.txt Normal file

Binary file not shown.

BIN
frontend/error_v4.txt Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
frontend/sites.txt Normal file

Binary file not shown.

View File

@ -8,7 +8,7 @@ const client = axios.create({
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}, },
timeout: 10000, timeout: 60000,
}) })
// Request interceptor // Request interceptor

View File

@ -354,7 +354,12 @@ async function confirmCreateRoute() {
isCreating.value = false isCreating.value = false
} catch (err: any) { } catch (err: any) {
console.error('Error creating route:', err) console.error('Error creating route:', err)
alert('No se pudo crear la ruta: ' + (err.response?.data?.detail || err.message)) const errorMsg = err.response?.data?.detail
|| err.response?.data?.message
|| err.message
|| 'Error desconocido'
const errorDetail = err.response ? `Status: ${err.response.status}` : 'No hubo respuesta del servidor (Network Error)'
alert(`No se pudo crear la ruta: ${errorMsg}\n\nDetalle: ${errorDetail}`)
} }
} }

View File

@ -209,7 +209,8 @@ async function saveShuttle() {
<h2>Previsualización en Directo</h2> <h2>Previsualización en Directo</h2>
</div> </div>
<!-- PREVIEW PANEL --> <div class="preview-container">
<!-- PREVIEW CARD -->
<div class="shuttle-card-preview" :class="{ expanded: true }" :style="{ backgroundImage: `url(${previewImageUrl})` }"> <div class="shuttle-card-preview" :class="{ expanded: true }" :style="{ backgroundImage: `url(${previewImageUrl})` }">
<div class="shuttle-main-info"> <div class="shuttle-main-info">
<div class="shuttle-header-mini"> <div class="shuttle-header-mini">