Skip to content

Commit

Permalink
chg: [publish] Print the message from the server (for example when du…
Browse files Browse the repository at this point in the history
…plicate sighting is detected.
  • Loading branch information
cedricbonhomme committed Nov 19, 2024
1 parent f8d73d3 commit 2c7120d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fedivuln/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ def push_sighting_to_vulnerability_lookup(status_uri, vulnerability_ids):

# Post the JSON to Vulnerability Lookup
try:
vuln_lookup.create_sighting(sighting=sighting)
r = vuln_lookup.create_sighting(sighting=sighting)
if "message" in r:
print(r["message"])
except Exception as e:
print(
f"Error when sending POST request to the Vulnerability Lookup server:\n{e}"
Expand Down

0 comments on commit 2c7120d

Please sign in to comment.