don't bail if response isn't ok

This commit is contained in:
Daylin Morgan 2024-11-20 11:48:08 -06:00
parent 9b914e360f
commit 8606ed4523
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -74,11 +74,14 @@ proc postGhApi(url: string, body: JsonNode) =
"Authorization" : fmt"Bearer {ghToken}", "Authorization" : fmt"Bearer {ghToken}",
"X-GitHub-Api-Version": "2022-11-28", "X-GitHub-Api-Version": "2022-11-28",
}) })
var response: Response
try: try:
let response = client.post(url, body = $body) response = client.post(url, body = $body)
info fmt"Status: {response.code}" info fmt"Status: {response.code}"
except: except:
errorQuit "failed to get response code" errorQuit "failed to get response code"
if response.code != Http204:
errorQuit "failed to post github api request"
proc getInProgressRun( proc getInProgressRun(
workflow: string, workflow: string,