Skip to content

Commit

Permalink
changing return code to 404 if log file not found
Browse files Browse the repository at this point in the history
  • Loading branch information
PhillipsOwen committed Jun 30, 2023
1 parent 9632bda commit 438a979
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 438a979

Please sign in to comment.