fix: show error message on collab save failure (#6063)
* fix: show error message on collab save failure * comment
This commit is contained in:
parent
9230c8f4d2
commit
08afb857c3
@ -242,6 +242,12 @@ class Collab extends PureComponent<Props, CollabState> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
this.setState({
|
||||||
|
// firestore doesn't return a specific error code when size exceeded
|
||||||
|
errorMessage: /is longer than.*?bytes/.test(error.message)
|
||||||
|
? t("errors.collabSaveFailed_sizeExceeded")
|
||||||
|
: t("errors.collabSaveFailed"),
|
||||||
|
});
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -202,7 +202,9 @@
|
|||||||
"svgImageInsertError": "Couldn't insert SVG image. The SVG markup looks invalid.",
|
"svgImageInsertError": "Couldn't insert SVG image. The SVG markup looks invalid.",
|
||||||
"invalidSVGString": "Invalid SVG.",
|
"invalidSVGString": "Invalid SVG.",
|
||||||
"cannotResolveCollabServer": "Couldn't connect to the collab server. Please reload the page and try again.",
|
"cannotResolveCollabServer": "Couldn't connect to the collab server. Please reload the page and try again.",
|
||||||
"importLibraryError": "Couldn't load library"
|
"importLibraryError": "Couldn't load library",
|
||||||
|
"collabSaveFailed": "Couldn't save to the backend database. If problems persist, you should save your file locally to ensure you don't lose your work.",
|
||||||
|
"collabSaveFailed_sizeExceeded": "Couldn't save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don't lose your work."
|
||||||
},
|
},
|
||||||
"toolBar": {
|
"toolBar": {
|
||||||
"selection": "Selection",
|
"selection": "Selection",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user