Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
upload: Handle non-200 responses more gracefully.
Alex Vandiver098228a210ca
diff --git a/web/src/upload.ts b/web/src/upload.tsindex ec577601ec4..8e9824bd950 100644--- a/web/src/upload.ts+++ b/web/src/upload.ts@@ -464,6 +464,12 @@ export function setup_upload(config: Config): Uppy<Meta, TusBody> {uppy.on("upload-success", (file, response) => {assert(file !== undefined);+ if (response.status !== 200) {+ blueslip.warn("Tus server returned an error, expected a 200 OK response code.", {+ response,+ });+ return;+ }let upload_response;try {upload_response = zulip_upload_response_schema.parse(