function deleteConfirmedHandler() {
deleteNote(note.value.title)
.then(() => {
+ toast.add(getToastOptions("Success", "Note deleted."));
router.push({ name: "home" });
})
.catch((error) => {
}
function noteSaveFailure(error) {
- if (error.response.status === 409) {
+ if (error.response?.status === 409) {
toast.add(
getToastOptions(
"Duplicate",
true,
),
);
+ } else if (error.response?.status === 413) {
+ toast.add(
+ getToastOptions(
+ "Failure",
+ "This note is too large. Please try again with a smaller note or adjust your server configuration.",
+ true,
+ ),
+ );
} else {
apiErrorHandler(error, toast);
}