raidAthmaneBenlala commited on
Commit
8cd65c6
·
1 Parent(s): 12dc5da

Enhance error logging for AI server failures

Browse files
Files changed (1) hide show
  1. toothmap_frontend/src/App.jsx +1 -1
toothmap_frontend/src/App.jsx CHANGED
@@ -69,7 +69,7 @@ export default function App() {
69
  }
70
  } catch (e) {
71
  console.error(e);
72
- alert("Error contacting the AI server. Ensure the FastAPI server is running on port 8000.");
73
  } finally {
74
  setLoading(false);
75
  }
 
69
  }
70
  } catch (e) {
71
  console.error(e);
72
+ alert("Error: " + (e.response ? e.response.status + " - " + JSON.stringify(e.response.data) : e.message));
73
  } finally {
74
  setLoading(false);
75
  }