You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maxachis opened this issue
May 27, 2024
· 2 comments
Labels
enhancementNew feature or requestin_devThis is merged into the dev environment and waiting to be merged into mainpythonPull requests that update Python code
There are several cases where an environmental variable is pulled but where no clear error is thrown when the environmental variable is not provided.
For example, login_queries.py:
defcreate_session_token(cursor: PgCursor, user_id: int, email: str) ->str:
""" Generates a session token for a user and inserts it into the session_tokens table. .... """# ...session_token=jwt.encode(payload, os.getenv("SECRET_KEY"), algorithm="HS256")
# ...
This can cause confusion, especially for developers, who will have to dig into the code to find out that the cause of an error is a missing environmental variable.
Tests should additionally be added to ensure the app functions appropriately when environmental variables are not provided.
The text was updated successfully, but these errors were encountered:
@maxachis I'd say the app doesn't need to function appropriately without environment variables; we could just throw an error and tell people they're required.
@maxachis I'd say the app doesn't need to function appropriately without environment variables; we could just throw an error and tell people they're required.
@josh-chamberlain Oh, of course: What I meant was it we should test that it functions appropriately by throwing and error and telling people they're required.
enhancementNew feature or requestin_devThis is merged into the dev environment and waiting to be merged into mainpythonPull requests that update Python code
There are several cases where an environmental variable is pulled but where no clear error is thrown when the environmental variable is not provided.
For example,
login_queries.py
:This can cause confusion, especially for developers, who will have to dig into the code to find out that the cause of an error is a missing environmental variable.
Tests should additionally be added to ensure the app functions appropriately when environmental variables are not provided.
The text was updated successfully, but these errors were encountered: