When starting the app.py and there is no PATH_JWT_SECRET_KEY file. An unhandled exception occurs.
It should be handled to tell the user of the missing file.
~/endpointdb$ ./app.py
Traceback (most recent call last):
File "/home/ubuntu/endpointdb/./app.py", line 26, in <module>
with PATH_JWT_SECRET_KEY.open() as jwt_file:
File "/usr/lib/python3.10/pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/endpointdb/auth_jwt_secret_key'
This will be needed for the PATH_PASSWORD file as well!
[x] Handle FileNotFoundError for the PATH_JWT_SECRET_KEY file
[x] Handle FileNotFoundError for the PATH_PASSWORD file
When starting the app.py and there is no
PATH_JWT_SECRET_KEY
file. An unhandled exception occurs.It should be handled to tell the user of the missing file.
This will be needed for the
PATH_PASSWORD
file as well!FileNotFoundError
for thePATH_JWT_SECRET_KEY
fileFileNotFoundError
for thePATH_PASSWORD
file