Only improved some messages

This commit is contained in:
Francesco Mangiacrapa 2019-09-27 15:17:06 +02:00
parent 4b57fae760
commit 46fec84b55
1 changed files with 3 additions and 3 deletions

View File

@ -123,9 +123,9 @@ public class StorageHubResolver {
dispValue = ConstantsResolver.CONTENT_DISPOSITION_VALUE.valueOf(contDisp);
}catch (Exception e) {
String allowedValues = String.format("{%s,%s}", CONTENT_DISPOSITION_VALUE.inline,CONTENT_DISPOSITION_VALUE.attachment);
String errorMsg = "The parameter "+ConstantsResolver.QUERY_PARAM_CONTENTDISPOSITION+" passed in the query string is not a value of "+allowedValues;
logger.error(errorMsg);
throw ExceptionManager.badRequestException(req, errorMsg, StorageHubResolver.class, help);
String msg = String.format("Wrong parameter: '%s=%s'. Valid '%s' values are: %s",ConstantsResolver.QUERY_PARAM_CONTENTDISPOSITION,contDisp,ConstantsResolver.QUERY_PARAM_CONTENTDISPOSITION,allowedValues);
logger.error(msg);
throw ExceptionManager.wrongParameterException(req, msg, StorageHubResolver.class, help);
}
}