Skip to content

Commit

Permalink
Fix uninformative timestamp error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ziqing26 committed Jan 15, 2022
1 parent c180db1 commit 1b9dd15
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,23 @@ public void setPublishedEmailEnabled(boolean publishedEmailEnabled) {
@Override
public void validate() throws InvalidHttpRequestBodyException {
assertTrue(instructions != null, "Instructions cannot be null");
assertTrue(submissionStartTimestamp > 0L, "Start timestamp should be more than zero");
assertTrue(submissionEndTimestamp > 0L, "End timestamp should be more than zero");
assertTrue(submissionStartTimestamp > 0L, "Submission opening date is invalid");
assertTrue(submissionEndTimestamp > 0L, "Submission closing date is invalid");

assertTrue(sessionVisibleSetting != null, "sessionVisibleSetting cannot be null");
if (sessionVisibleSetting == SessionVisibleSetting.CUSTOM) {
assertTrue(customSessionVisibleTimestamp != null,
"session visible timestamp should not be null");
"Session visible timestamp is invalid");
assertTrue(customSessionVisibleTimestamp > 0L,
"session visible timestamp should be more than zero");
"Session visible timestamp should be more than zero");
}

assertTrue(responseVisibleSetting != null, "responseVisibleSetting cannot be null");
if (responseVisibleSetting == ResponseVisibleSetting.CUSTOM) {
assertTrue(customResponseVisibleTimestamp != null,
"response visible timestamp should not be null");
"Response visible timestamp is invalid");
assertTrue(customResponseVisibleTimestamp > 0L,
"response visible timestamp should be more than zero");
"Response visible timestamp should be more than zero");
}
}
}

0 comments on commit 1b9dd15

Please sign in to comment.