From 438a979e4613cfc22e832d19f02e26c7bd673d50 Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Fri, 30 Jun 2023 10:35:29 -0400 Subject: [PATCH] changing return code to 404 if log file not found --- src/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.py b/src/server.py index ec5adfc..d2dd306 100644 --- a/src/server.py +++ b/src/server.py @@ -206,7 +206,7 @@ async def get_the_log_file(log_file: str = Query('log_file')): return FileResponse(path=log_file_path, filename=log_file_path.name, media_type='text/plain') # if we get here return an error - return JSONResponse(content={'Response': 'Error - Log file does not exist.'}, status_code=500, media_type="application/json") + return JSONResponse(content={'Response': 'Error - Log file does not exist.'}, status_code=404, media_type="application/json") @APP.get("/get_run_list", status_code=200, response_model=None)