π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
fix(media): fail the upload step when the backend returns an error
Gilad Resisi22f266aa24ca
diff --git a/libraries/react-shared-libraries/src/helpers/uppy.upload.ts b/libraries/react-shared-libraries/src/helpers/uppy.upload.tsindex acece4e7d..07dd08789 100644--- a/libraries/react-shared-libraries/src/helpers/uppy.upload.ts+++ b/libraries/react-shared-libraries/src/helpers/uppy.upload.ts@@ -119,6 +119,11 @@ const fetchUploadApiEndpoint = async ('Content-Type': 'application/json',},});+ // customFetch does not throw on HTTP errors, and Uppy treats whatever this+ // returns as a successful step+ if (!res.ok) {+ throw new Error(await res.text().catch(() => ''));+ }return res.json();};