Skip to content

Commit

Permalink
warn if a backend from config is not supported, change form_data to s…
Browse files Browse the repository at this point in the history
…ns for consistency
  • Loading branch information
leondutoit committed Apr 19, 2024
1 parent 8f7fde9 commit dabf747
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tsdfileapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2861,7 +2861,7 @@ class Backends:
),
("/v1/(.*)/survey", GenericTableHandler, dict(backend="survey")),
],
"form_data": [
"sns": [
("/v1/(.*)/sns/(.*)/(.*)", SnsFormDataHandler, dict(backend="sns")),
],
"publication": [
Expand Down Expand Up @@ -2959,6 +2959,9 @@ def __init__(self, config: dict) -> None:
for route in self.optional_routes[backend]:
print(colored(f"- {route[0]}", "yellow"))
self.routes.append(route)
else:
# TODO: change to exit once config has been cleaned
logger.warning(f"Unknown backend in config: {backend}")

db_backends = self.config["backends"]["dbs"].items()
if db_backends:
Expand Down

0 comments on commit dabf747

Please sign in to comment.