From fbaa73219fddd979dde0c8747a52192cf92de24a Mon Sep 17 00:00:00 2001 From: Gerben Kroes Date: Mon, 29 Jan 2024 09:20:40 +0100 Subject: [PATCH] Change error description Signed-off-by: Gerben Kroes --- .../bundle/BundledGetActualMeterReads.feature | 2 +- .../smartmetering/application/services/BundleService.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/integration-tests/cucumber-tests-platform-smartmetering/src/test/resources/features/osgp-adapter-ws-smartmetering/bundle/BundledGetActualMeterReads.feature b/integration-tests/cucumber-tests-platform-smartmetering/src/test/resources/features/osgp-adapter-ws-smartmetering/bundle/BundledGetActualMeterReads.feature index d3c46cfe41c..d9e74fefe87 100644 --- a/integration-tests/cucumber-tests-platform-smartmetering/src/test/resources/features/osgp-adapter-ws-smartmetering/bundle/BundledGetActualMeterReads.feature +++ b/integration-tests/cucumber-tests-platform-smartmetering/src/test/resources/features/osgp-adapter-ws-smartmetering/bundle/BundledGetActualMeterReads.feature @@ -109,7 +109,7 @@ Feature: SmartMetering Bundle - GetActualMeterReads | Code | 401 | | Message | VALIDATION_ERROR | | Component | DOMAIN_SMART_METERING | - | InnerMessage | Bundle request is not allowed for gas meter | + | InnerMessage | Bundle request is not allowed for gas meter (possible cause: gateway not defined for gas meter) | Scenario: Get actual meter reads of a G device without a gateway device and bundle device is E meter Given a dlms device diff --git a/osgp/platform/osgp-adapter-domain-smartmetering/src/main/java/org/opensmartgridplatform/adapter/domain/smartmetering/application/services/BundleService.java b/osgp/platform/osgp-adapter-domain-smartmetering/src/main/java/org/opensmartgridplatform/adapter/domain/smartmetering/application/services/BundleService.java index afd38015eb6..c3b51b2a497 100644 --- a/osgp/platform/osgp-adapter-domain-smartmetering/src/main/java/org/opensmartgridplatform/adapter/domain/smartmetering/application/services/BundleService.java +++ b/osgp/platform/osgp-adapter-domain-smartmetering/src/main/java/org/opensmartgridplatform/adapter/domain/smartmetering/application/services/BundleService.java @@ -180,7 +180,8 @@ private void checkIfBundleRequestIsAllowed(final Device smartMeter) throws Funct throw new FunctionalException( FunctionalExceptionType.VALIDATION_ERROR, ComponentType.DOMAIN_SMART_METERING, - new AssertionError("Bundle request is not allowed for gas meter")); + new AssertionError( + "Bundle request is not allowed for gas meter (possible cause: gateway not defined for gas meter)")); } }