checks updated

This commit is contained in:
lucio 2024-01-24 16:32:18 +01:00
parent c4d5cffe02
commit 0becded125
4 changed files with 10 additions and 4 deletions

View File

@ -151,6 +151,12 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<dependent-module archiveName="common-smartgears-app-3.0.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/common-smartgears-app/common-smartgears-app">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="common-configuration-scanner-1.1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/common-configuration-scanner/common-configuration-scanner">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="storagehub-model-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/storagehub-model/storagehub-model">
<dependency-type>uses</dependency-type>
</dependent-module>

View File

@ -30,10 +30,10 @@ public class DefaultStorageCheck implements HealthCheck{
if (((S3Backend)storageFactory.create(defaultPayload)).isAlive())
return HealthCheckResponse.builder(getName()).up().build();
else
return HealthCheckResponse.builder(getName()).down().withMessage("error contacting storage").build();
return HealthCheckResponse.builder(getName()).down().error("error contacting storage").build();
} catch (Exception e) {
log.error("error checking defaultStorage",e);
return HealthCheckResponse.builder(getName()).down().withMessage(e.getMessage()).build();
return HealthCheckResponse.builder(getName()).down().error(e.getMessage()).build();
}
}

View File

@ -24,7 +24,7 @@ public class JCRRepositoryCheck implements HealthCheck{
return HealthCheckResponse.builder(getName()).up().build();
}catch (LoginException e) { }
catch(Throwable ex) {
return HealthCheckResponse.builder(getName()).down().withMessage(ex.getMessage()).build();
return HealthCheckResponse.builder(getName()).down().error(ex.getMessage()).build();
}
return HealthCheckResponse.builder(getName()).up().build();
}

View File

@ -46,7 +46,7 @@ public class GcubeDefaultS3StorageBackendFactory implements StorageBackendFactor
if (payloadConfiguration.getParameters().isEmpty())
return singleton;
throw new InvalidCallParameters("gcubeMinIo created with not empty parameters");
throw new InvalidCallParameters("S3 created with not empty parameters");
}
private Metadata getParameters(){