Contributor Guidelines
Describe the bug?
Both fetch implementations don't check res.ok before calling .json(), which will throw unhandled errors for 4xx/5xx responses.
const res = await fetch(HASHNODE_API_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({...}),
});
const { data }: { data: { publication: HashnodePublication } } = await res.json(); // No res.ok check!
Impact: Network errors or API failures will cause cryptic JSON parsing errors instead of meaningful error messages.
Desktop or Mobile (Please provide your system information)
os
Screenshot / ScreenShare
No response
Code of Conduct