dwellir-public / rpc-endpoint-db-operator

Manages API endpoint data collection
Apache License 2.0
1 stars 0 forks source link

Unhandles exception when missing jwt token #4

Closed erik78se closed 1 year ago

erik78se commented 1 year ago

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!