Add backend error logging and increase frontend timeout
This commit is contained in:
@ -128,6 +128,15 @@ app.add_middleware(
|
||||
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
|
||||
for sub in ["profiles", "vehicles", "businesses"]:
|
||||
os.makedirs(os.path.join("uploads", sub), exist_ok=True)
|
||||
|
||||
0
frontend/error_build.txt
Normal file
0
frontend/error_build.txt
Normal file
BIN
frontend/error_clean.txt
Normal file
BIN
frontend/error_clean.txt
Normal file
Binary file not shown.
BIN
frontend/error_err.txt
Normal file
BIN
frontend/error_err.txt
Normal file
Binary file not shown.
BIN
frontend/error_full.txt
Normal file
BIN
frontend/error_full.txt
Normal file
Binary file not shown.
0
frontend/error_out.txt
Normal file
0
frontend/error_out.txt
Normal file
BIN
frontend/error_ps.txt
Normal file
BIN
frontend/error_ps.txt
Normal file
Binary file not shown.
BIN
frontend/error_report.txt
Normal file
BIN
frontend/error_report.txt
Normal file
Binary file not shown.
BIN
frontend/error_v.txt
Normal file
BIN
frontend/error_v.txt
Normal file
Binary file not shown.
BIN
frontend/error_v2.txt
Normal file
BIN
frontend/error_v2.txt
Normal file
Binary file not shown.
BIN
frontend/error_v3.txt
Normal file
BIN
frontend/error_v3.txt
Normal file
Binary file not shown.
BIN
frontend/error_v4.txt
Normal file
BIN
frontend/error_v4.txt
Normal file
Binary file not shown.
644
frontend/package-lock.json
generated
644
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
BIN
frontend/sites.txt
Normal file
BIN
frontend/sites.txt
Normal file
Binary file not shown.
@ -8,7 +8,7 @@ const client = axios.create({
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
timeout: 10000,
|
||||
timeout: 60000,
|
||||
})
|
||||
|
||||
// Request interceptor
|
||||
|
||||
@ -354,7 +354,12 @@ async function confirmCreateRoute() {
|
||||
isCreating.value = false
|
||||
} catch (err: any) {
|
||||
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}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -209,7 +209,8 @@ async function saveShuttle() {
|
||||
<h2>Previsualización en Directo</h2>
|
||||
</div>
|
||||
|
||||
<!-- PREVIEW PANEL -->
|
||||
<div class="preview-container">
|
||||
<!-- PREVIEW CARD -->
|
||||
<div class="shuttle-card-preview" :class="{ expanded: true }" :style="{ backgroundImage: `url(${previewImageUrl})` }">
|
||||
<div class="shuttle-main-info">
|
||||
<div class="shuttle-header-mini">
|
||||
|
||||
Reference in New Issue
Block a user