Skip to content

Commit

Permalink
fix(bench-api): handle AgentRequestSkippedException error for logs …
Browse files Browse the repository at this point in the history
…endpoint
  • Loading branch information
BreadGenie committed Jul 2, 2024
1 parent 927ec0f commit 8753f25
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion press/api/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,13 @@ def update_all_sites(name):
@frappe.whitelist()
@protected("Release Group")
def logs(name, bench):
from press.agent import AgentRequestSkippedException

if frappe.db.get_value("Bench", bench, "group") == name:
return frappe.get_doc("Bench", bench).server_logs
try:
return frappe.get_doc("Bench", bench).server_logs
except AgentRequestSkippedException:
return []


@frappe.whitelist()
Expand Down

0 comments on commit 8753f25

Please sign in to comment.