Catch exceptions on pronoun update
This commit is contained in:
parent
decacb4e87
commit
2579fa4b5c
1 changed files with 5 additions and 2 deletions
|
@ -17,8 +17,11 @@ plugins = load_plugins_for_config(app.config.get("PLUGINS", [{"name": "log"}]))
|
|||
|
||||
def trigger_update_pronouns(pronouns: str) -> None:
|
||||
update = PronounUpdate(pronouns)
|
||||
[plugin.update_bio(update) for plugin in plugins]
|
||||
|
||||
for plugin in plugins:
|
||||
try:
|
||||
plugin.update_bio(update)
|
||||
except Exception as e:
|
||||
print(f"Failed to update pronouns with the gitea plugin {plugin.name}. \n {e}")
|
||||
|
||||
@app.route("/update_pronouns", methods=["POST"])
|
||||
def update_pronouns() -> Tuple[str, int]:
|
||||
|
|
Loading…
Reference in a new issue