enhance(frontend): ファイルのアップロード時に524が返された際のエラーを明示的に表示するように (MisskeyIO#710)
This commit is contained in:
parent
63f1a8d8ec
commit
8329498d4c
5 changed files with 13 additions and 0 deletions
|
@ -98,6 +98,12 @@ export function uploadFile(
|
|||
title: i18n.ts.failedToUpload,
|
||||
text: i18n.ts.cannotUploadBecauseExceedsFileSizeLimit,
|
||||
});
|
||||
} else if (xhr.status === 524) {
|
||||
alert({
|
||||
type: 'error',
|
||||
title: i18n.ts.failedToUpload,
|
||||
text: i18n.ts.cannotUploadBecauseTimeout,
|
||||
});
|
||||
} else if (ev.target?.response) {
|
||||
const res = JSON.parse(ev.target.response);
|
||||
if (res.error?.id === 'bec5bd69-fba3-43c9-b4fb-2894b66ad5d2') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue