Make more of the codebase conform to strict types (#10857)
This commit is contained in:
parent
7f017a84c2
commit
6a3f59cc76
45 changed files with 127 additions and 121 deletions
|
@ -580,13 +580,13 @@ export default class ContentMessages {
|
|||
} catch (error) {
|
||||
// 413: File was too big or upset the server in some way:
|
||||
// clear the media size limit so we fetch it again next time we try to upload
|
||||
if (error?.httpStatus === 413) {
|
||||
if (error instanceof HTTPError && error.httpStatus === 413) {
|
||||
this.mediaConfig = null;
|
||||
}
|
||||
|
||||
if (!upload.cancelled) {
|
||||
let desc = _t("The file '%(fileName)s' failed to upload.", { fileName: upload.fileName });
|
||||
if (error.httpStatus === 413) {
|
||||
if (error instanceof HTTPError && error.httpStatus === 413) {
|
||||
desc = _t("The file '%(fileName)s' exceeds this homeserver's size limit for uploads", {
|
||||
fileName: upload.fileName,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue