Handle 413 response on image uploads (#154)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
This commit is contained in:
Sander Saarend 2023-07-04 00:59:54 +03:00 committed by GitHub
parent 0a9c151b8e
commit d497a1efea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1284,6 +1284,10 @@ export class LemmyHttp {
},
});
if (response.status === 413) {
return { msg: "too_large" };
}
const responseJson = await response.json();
if (responseJson.msg === "ok") {