summaryrefslogtreecommitdiff
path: root/src/jwebmail/webmail.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/jwebmail/webmail.py')
-rw-r--r--src/jwebmail/webmail.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/jwebmail/webmail.py b/src/jwebmail/webmail.py
index d260e8a..6c0b6c2 100644
--- a/src/jwebmail/webmail.py
+++ b/src/jwebmail/webmail.py
@@ -26,7 +26,7 @@ from wtforms import (
validators,
)
-from .model.read_mails import QMAuthError
+from .model.read_mails import JWebmailMailStorageError
from .read_mails import get_read_mails_logged_in
from .read_mails import login as rm_login
from .render_mail import to_mime_type
@@ -165,8 +165,11 @@ def readmail(msgid, folder=""):
if format == "html":
try:
mail = read_mails.show(folder, msgid)
- except QMAuthError:
- return render_template("not_found.html"), 404
+ except JWebmailMailStorageError as ex:
+ if ex.name == "InvalidMID":
+ return render_template("not_found.html"), 404
+ else:
+ raise
return render_template("readmail.html", msg=mail, folder=folder)