Skip to content

Commit

Permalink
Handle errors when kicking off github workflows (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinabrahms authored Jul 18, 2023
1 parent e34b5db commit ad2845d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/api/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ impl<'octo> WorkflowDispatchBuilder<'octo> {
.build()
.context(HttpSnafu)?;

// this entry point doesn't actually return anything sensible
self.crab._post(uri, Some(&self.data)).await?;
let response = self.crab._post(uri, Some(&self.data)).await?;
if !response.status().is_success() {
return Err(crate::map_github_error(response).await.unwrap_err());
}

Ok(())
}
Expand Down

0 comments on commit ad2845d

Please sign in to comment.