mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
chore: Add error handling for missing pre_render method in plugin in web UI
This commit is contained in:
parent
3f78491165
commit
aa0e7620c4
1 changed files with 3 additions and 0 deletions
|
|
@ -318,6 +318,9 @@ def run_action(plugin: str, function_name: str = ""):
|
|||
|
||||
res = method(app=app, args=queries, data=data)
|
||||
except AttributeError:
|
||||
if function_name == "pre_render":
|
||||
return {"status": "ok", "code": 200, "message": "The plugin does not have a pre_render method"}
|
||||
|
||||
message = "The plugin does not have a method, see logs for more details"
|
||||
except:
|
||||
message = "An error occurred while executing the plugin, see logs for more details"
|
||||
|
|
|
|||
Loading…
Reference in a new issue