private void validateAccountPreferences(Long stackId, Integer scalingAdjustment) { try { accountPreferencesValidator.validate(stackId, scalingAdjustment); } catch (AccountPreferencesValidationFailed e) { throw new BadRequestException(e.getMessage(), e); } }
private void validateAccountPreferences(Stack stack, CbUser user) { try { accountPreferencesValidator.validate(stack, user.getAccount(), user.getUserId()); } catch (AccountPreferencesValidationFailed e) { throw new BadRequestException(e.getMessage(), e); } }