Skip to content

Commit e7a23e1

Browse files
fix: handle CustomFileDoesNotExistAnymoreError
Show error message to the user instead of throwing internal server error
1 parent 2c078c0 commit e7a23e1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sketch_map_tool/routes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from sketch_map_tool.database import client_flask as db_client_flask
2424
from sketch_map_tool.definitions import REQUEST_TYPES
2525
from sketch_map_tool.exceptions import (
26+
CustomFileDoesNotExistAnymoreError,
2627
CustomFileNotFoundError,
2728
QRCodeError,
2829
TranslatableError,
@@ -380,6 +381,7 @@ def health(lang="en"):
380381

381382

382383
@app.errorhandler(QRCodeError)
384+
@app.errorhandler(CustomFileDoesNotExistAnymoreError)
383385
@app.errorhandler(CustomFileNotFoundError)
384386
@app.errorhandler(UploadLimitsExceededError)
385387
def handle_exception(error: TranslatableError):

0 commit comments

Comments
 (0)