Only improved some messages
This commit is contained in:
parent
4b57fae760
commit
46fec84b55
|
@ -123,9 +123,9 @@ public class StorageHubResolver {
|
||||||
dispValue = ConstantsResolver.CONTENT_DISPOSITION_VALUE.valueOf(contDisp);
|
dispValue = ConstantsResolver.CONTENT_DISPOSITION_VALUE.valueOf(contDisp);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
String allowedValues = String.format("{%s,%s}", CONTENT_DISPOSITION_VALUE.inline,CONTENT_DISPOSITION_VALUE.attachment);
|
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;
|
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(errorMsg);
|
logger.error(msg);
|
||||||
throw ExceptionManager.badRequestException(req, errorMsg, StorageHubResolver.class, help);
|
throw ExceptionManager.wrongParameterException(req, msg, StorageHubResolver.class, help);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue