[UPD] Exception handling

This commit is contained in:
2026-02-15 20:53:32 +01:00
parent 2a8a44e80b
commit 969333998c
17 changed files with 105 additions and 81 deletions

View File

@@ -17,11 +17,5 @@ def read_libraries():
@api_library.route("/<_id>", methods=["GET"])
def read_library(_id):
try:
library = LibraryController(_id)
except NoResultFound as e:
logger.debug(f"No result found for Library wid id {_id}")
logger.debug(f"Error {e}")
logger.debug(f"Error {dir(e)}")
return { "status": "error", "result": "Library not found"}, 404
library = LibraryController(_id)
return { "status": "ok", "result": library.data.to_dict() }, 200