Skip to content

Commit

Permalink
chg: print a message if there is one in the answer from the server
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Nov 20, 2024
1 parent e1de02a commit 811cc5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nucleivuln/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ def push_sighting_to_vulnerability_lookup(

# 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 811cc5f

Please sign in to comment.