Catches exception on get Configuration

This commit is contained in:
Fabio Sinibaldi 2020-10-13 15:37:41 +02:00
parent 096afda31c
commit 2465ed3741
1 changed files with 8 additions and 3 deletions

View File

@ -28,16 +28,21 @@ public class SDI {
@GET
@Produces(MediaType.APPLICATION_JSON)
// @JacksonFeatures(serializationEnable = { SerializationFeature.INDENT_OUTPUT })
public ScopeConfiguration getConfiguration(){
try {
ScopeConfiguration config=sdiManager.getContextConfiguration();
log.debug("Served Configuration");
return config;
}catch(Throwable t) {
log.error("Unable to serve get configuration");
throw new WebApplicationException("Unable to get configuration. Contact administrator.",t);
}
return sdiManager.getContextConfiguration();
}
@GET
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
// @JacksonFeatures(serializationEnable = { SerializationFeature.INDENT_OUTPUT })
@Path("status")
public HealthReport getReport() {
try{