Jaita commited on
Commit
c24f5d5
·
verified ·
1 Parent(s): 3e28faa

Update src/App.jsx

Browse files
Files changed (1) hide show
  1. src/App.jsx +6 -6
src/App.jsx CHANGED
@@ -60,13 +60,13 @@ function App() {
60
  //console.log("response",response);
61
  //console.log("response.json()",response.json())
62
 
63
- if (!response.ok) {
64
  // Read raw text so HTML errors don’t crash JSON parsing
65
- const text = await response.text();
66
- throw new Error(`Backend ${response.status}: ${text}`);
67
- } else {
68
- data = await response.json(); // safe now
69
- }
70
 
71
  if (!response.ok) {
72
  throw new Error(`HTTP error! status: ${response.status}`);
 
60
  //console.log("response",response);
61
  //console.log("response.json()",response.json())
62
 
63
+ //if (!response.ok) {
64
  // Read raw text so HTML errors don’t crash JSON parsing
65
+ // const text = await response.text();
66
+ // throw new Error(`Backend ${response.status}: ${text}`);
67
+ //} else {
68
+ // data = await response.json(); // safe now
69
+ //}
70
 
71
  if (!response.ok) {
72
  throw new Error(`HTTP error! status: ${response.status}`);