Skip to content

Commit

Permalink
Added failure case to internal dispatch (#1329)
Browse files Browse the repository at this point in the history
* Internal dispatcher

* Check if curl fails
  • Loading branch information
miratepuffin authored Oct 12, 2023
1 parent 0d5acda commit 030c2f1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/internal_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,11 @@ jobs:
repo: '${{ secrets.PROJECT_ONE }}',
event_type: 'raphtory-update',
client_payload: {"update": "master"}
})
console.log(result);
});
// Check the status code of the response
if (result.status !== 204) { // 204 No Content is a typical successful response for dispatch events
console.error('Failed to dispatch the event. Response:', result);
throw new Error('Dispatch event failed'); // Throwing an error will fail the job
}
console.log('Dispatch event was successful:', result);

0 comments on commit 030c2f1

Please sign in to comment.