Skip to content

Commit 0065779

Browse files
authored
Add error handling to pagerduty action (#5855)
1 parent ba415bb commit 0065779

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/actions/pagerduty/action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ runs:
8383
},
8484
})
8585
86+
if (!response.ok) {
87+
throw new Error(`Received unexpected ${response.status} response with body: ${await response.text()}`);
88+
}
89+
8690
const data = await response.json()
8791
if (!data.schedule) {
8892
throw new Error('Unable to get schedule for id: ${{ inputs.schedule-id }}')

0 commit comments

Comments
 (0)