Skip to content

Commit

Permalink
throw an Error when response code is not HTTP_OK
Browse files Browse the repository at this point in the history
  • Loading branch information
VardyNg committed Sep 15, 2023
1 parent 1dfb176 commit 0cd4885
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void perform(Run<?, ?> run, FilePath workspace, EnvVars env, Launcher lau
listener.getLogger().println("Request was successful!");
} else {
// Handle any other responses here
listener.getLogger().println("Failed with HTTP response code: " + responseCode);
throw new Error("Failed with HTTP response code: " + responseCode);
}
} catch (Exception e) {
e.printStackTrace();
Expand Down

0 comments on commit 0cd4885

Please sign in to comment.