Skip to content

Commit

Permalink
bump error code
Browse files Browse the repository at this point in the history
  • Loading branch information
tadgh committed Aug 17, 2022
1 parent dfc6b93 commit eb7e643
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ public void testSearchParamValidatingInterceptorNotAllowingOverlappingOnCreate()
fail();
}catch (UnprocessableEntityException e){
// all is good
assertTrue(e.getMessage().contains("2124"));
assertTrue(e.getMessage().contains("2131"));
}
}

Expand Down Expand Up @@ -504,7 +504,7 @@ public void testSearchParamValidatingInterceptorNotAllowingOverlappingOnCreateWi
fail();
} catch (UnprocessableEntityException e){
// this is good
assertTrue(e.getMessage().contains("2124"));
assertTrue(e.getMessage().contains("2131"));
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void validateSearchParamOnCreate(IBaseResource theResource, RequestDetail
List<ResourcePersistentId> persistedIdList = getDao().searchForIds(searchParameterMap, theRequestDetails);

if( isNotEmpty(persistedIdList) ) {
throw new UnprocessableEntityException(Msg.code(2124) + "Can't process submitted SearchParameter as it is overlapping an existing one.");
throw new UnprocessableEntityException(Msg.code(2131) + "Can't process submitted SearchParameter as it is overlapping an existing one.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void whenCreatingOverlappingSearchParam_thenExceptionIsThrown(){
mySearchParamValidatingInterceptor.resourcePreCreate(newSearchParam, myRequestDetails);
fail();
}catch (UnprocessableEntityException e){
assertTrue(e.getMessage().contains("2124"));
assertTrue(e.getMessage().contains("2131"));
}

}
Expand Down

0 comments on commit eb7e643

Please sign in to comment.