Skip to content

Commit

Permalink
Updated error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
zack-rma authored and adamkorynta committed Nov 15, 2024
1 parent 0f36e8d commit b5d4356
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,8 @@ public void create(@NotNull Context ctx) {
if (!deserialize.getLocationCategory().getOfficeId().equalsIgnoreCase(CWMS_OFFICE)
&& (!deserialize.getOfficeId().equalsIgnoreCase(deserialize.getLocationCategory().getOfficeId())
|| deserialize.getOfficeId().equalsIgnoreCase(CWMS_OFFICE))) {
CdaError re = new CdaError("Location Group office ID cannot be CWMS and must match the "
+ "Location Category office ID");
throw new IllegalArgumentException(re.toString());
throw new IllegalArgumentException("Location Group office ID cannot be CWMS and must match the "
+ "Location Category office ID");
}

LocationGroupDao dao = new LocationGroupDao(dsl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,8 @@ public void create(@NotNull Context ctx) {
if (!deserialize.getTimeSeriesCategory().getOfficeId().equalsIgnoreCase(CWMS_OFFICE)
&& (!deserialize.getOfficeId().equalsIgnoreCase(deserialize.getTimeSeriesCategory().getOfficeId())
|| deserialize.getOfficeId().equalsIgnoreCase(CWMS_OFFICE))) {
CdaError re = new CdaError("TimeSeries Group office ID cannot be CWMS and must match the "
throw new IllegalArgumentException("TimeSeries Group office ID cannot be CWMS and must match the "
+ "TimeSeries Category office ID");
throw new IllegalArgumentException(re.toString());
}

boolean failIfExists = ctx.queryParamAsClass(FAIL_IF_EXISTS, Boolean.class).getOrDefault(true);
Expand Down

0 comments on commit b5d4356

Please sign in to comment.