Skip to content

Comments

fix: check response.ok in write methods, drop Promise wrapper#330

Merged
pradeeban merged 1 commit intoControlCore-Project:devfrom
avinxshKD:fix/crud-http-response-check
Feb 20, 2026
Merged

fix: check response.ok in write methods, drop Promise wrapper#330
pradeeban merged 1 commit intoControlCore-Project:devfrom
avinxshKD:fix/crud-http-response-check

Conversation

@avinxshKD
Copy link

Fixes #302

postGraph, updateGraph, and forceUpdateGraph were resolving on any HTTP response, so a 4xx/5xx from the server looked like a success to the rest of the app. Added a response.ok check to each so they reject on error, same as getGraphWithHashCheck already does. Also removed the new Promise() wrapper from all four functions since fetch already returns a promise and the wrapper was swallowing network errors

@pradeeban pradeeban merged commit e336650 into ControlCore-Project:dev Feb 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants