mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-30 13:34:50 +02:00
[eric] state: the last seven data.X thunks reject on non-2xx, closing the ENG-277 payload class
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user