[eric] state: the last seven data.X thunks reject on non-2xx, closing the ENG-277 payload class

This commit is contained in:
ciregenz
2026-08-12 19:47:27 -07:00
parent 74de4c2da8
commit e2602f96de
4 changed files with 7 additions and 0 deletions
+1
View File
@@ -66,6 +66,7 @@ export const createTool = createAsyncThunk(
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(`Create tool failed: ${res.status}`);
const data = await res.json();
return data.tool as ToolDefinition;
}