Spaces:
Paused
Paused
Log discord errors
Browse files
app.py
CHANGED
@@ -229,7 +229,8 @@ def summary(webhook_url, disable_discord, env, username, state):
|
|
229 |
json={"content": summary, "allowed_mentions": {"parse": []}},
|
230 |
)
|
231 |
r.raise_for_status()
|
232 |
-
except Exception:
|
|
|
233 |
return "Error: webhook discord failed"
|
234 |
elif env == Env.CHALLENGE_EASY:
|
235 |
webhook_url = discord_webhook_url_easy
|
@@ -251,7 +252,8 @@ def summary(webhook_url, disable_discord, env, username, state):
|
|
251 |
json={"content": chunk, "allowed_mentions": {"parse": []}},
|
252 |
)
|
253 |
r.raise_for_status()
|
254 |
-
except Exception:
|
|
|
255 |
return "Error: webhook discord failed"
|
256 |
elif env == Env.CHALLENGE_HARD:
|
257 |
# TODO: add row to table with all prompt injections
|
@@ -383,7 +385,8 @@ def run_summary_hard():
|
|
383 |
json={"content": chunk, "allowed_mentions": {"parse": []}},
|
384 |
)
|
385 |
r.raise_for_status()
|
386 |
-
except Exception:
|
|
|
387 |
return "Error: webhook discord failed"
|
388 |
|
389 |
|
|
|
229 |
json={"content": summary, "allowed_mentions": {"parse": []}},
|
230 |
)
|
231 |
r.raise_for_status()
|
232 |
+
except Exception as e:
|
233 |
+
print("Webhook discord failed: ", e)
|
234 |
return "Error: webhook discord failed"
|
235 |
elif env == Env.CHALLENGE_EASY:
|
236 |
webhook_url = discord_webhook_url_easy
|
|
|
252 |
json={"content": chunk, "allowed_mentions": {"parse": []}},
|
253 |
)
|
254 |
r.raise_for_status()
|
255 |
+
except Exception as e:
|
256 |
+
print("Webhook discord failed: ", e)
|
257 |
return "Error: webhook discord failed"
|
258 |
elif env == Env.CHALLENGE_HARD:
|
259 |
# TODO: add row to table with all prompt injections
|
|
|
385 |
json={"content": chunk, "allowed_mentions": {"parse": []}},
|
386 |
)
|
387 |
r.raise_for_status()
|
388 |
+
except Exception as e:
|
389 |
+
print("Webhook discord failed: ", e)
|
390 |
return "Error: webhook discord failed"
|
391 |
|
392 |
|