Skip to content

Commit

Permalink
Simplify error message
Browse files Browse the repository at this point in the history
  • Loading branch information
AmilcarKippes committed Jun 6, 2024
1 parent 504a479 commit 50aa6d7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ async function requestJenkinsJob(jobName, params, headers) {
.on('response', (res) => {
core.info(`>>> Response: ${JSON.stringify(res)}`);
if (res.statusCode != 201) {
core.setFailed("Build not created");
core.error({message: "Build not created"});
reject({message: "Build not created"});
}
resolve();
reject({message: "Build not Created"});
} else {
resolve();
}
})
.on("error", (err) => {
core.setFailed(err);
Expand Down

0 comments on commit 50aa6d7

Please sign in to comment.