Skip to content

Commit

Permalink
feat: adjusting response when no jobs found
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Apr 14, 2024
1 parent 771cdb5 commit 0bdad7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ static String construct404Message(final String givenToken) {
final boolean noTokenGiven = Strings.isNullOrEmpty(givenToken);
if (noTokenGiven) {
msg += NO_JOBS_MSG_NO_TOKEN;
msg += NO_JOBS_HOW_TO_USE_TOKEN;
msg += NO_JOBS_HOW_TO_AUTH;
} else {
msg += NO_JOBS_MSG_TOKEN;
}
msg += NO_JOBS_HOW_TO_USE_TOKEN;
msg += NO_JOBS_HOW_TO_AUTH;
return msg;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,6 @@ public void test404MessageNoToken_given() {

assertThat(actual)
.isEqualToIgnoringWhitespace(
"Did not find any jobs with GenericTrigger configured!\n"
+ "A token was supplied.\n"
+ "If you are using a token, you need to pass it like ...trigger/invoke?token=TOKENHERE\n"
+ "If you are not using a token, you need to authenticate like http://user:passsword@example.org/generic-webhook...\n");
"Did not find any jobs with GenericTrigger configured!\n" + "A token was supplied.");
}
}

0 comments on commit 0bdad7f

Please sign in to comment.