mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-12-22 19:01:27 +00:00
Handle 413 response on image uploads (#154)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
This commit is contained in:
parent
0a9c151b8e
commit
d497a1efea
1 changed files with 4 additions and 0 deletions
|
@ -1284,6 +1284,10 @@ export class LemmyHttp {
|
|||
},
|
||||
});
|
||||
|
||||
if (response.status === 413) {
|
||||
return { msg: "too_large" };
|
||||
}
|
||||
|
||||
const responseJson = await response.json();
|
||||
|
||||
if (responseJson.msg === "ok") {
|
||||
|
|
Loading…
Reference in a new issue