Skip to content

Commit 905596d

Browse files
committed
Update main.py
Catch other exceptions
1 parent 670643f commit 905596d

File tree

1 file changed

+4
-1
lines changed
  • .github/actions/log_to_splunk

1 file changed

+4
-1
lines changed

.github/actions/log_to_splunk/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def main():
3030

3131
try:
3232
x = requests.get(summary_url, stream=True, auth=('token',GITHUB_TOKEN))
33-
33+
x.raise_for_status()
3434
except requests.exceptions.HTTPError as errh:
3535
output = "GITHUB API Http Error:" + str(errh)
3636
print(f"Error: {output}")
@@ -51,6 +51,9 @@ def main():
5151
print(f"Error: {output}")
5252
print(f"::set-output name=result::{output}")
5353
return
54+
except Exception as e:
55+
print("Internal error", e)
56+
return None
5457

5558
summary = x.json()
5659

0 commit comments

Comments
 (0)