TSK-590 Add more descriptive error message on service level error.
- Error message on validating service level is more descriptive adding some examples of how to use the ISO-8601 format.
This commit is contained in:
parent
84b681d442
commit
bc317b6c72
|
@ -266,7 +266,9 @@ public class ClassificationServiceImpl implements ClassificationService {
|
|||
try {
|
||||
Duration.parse(classification.getServiceLevel());
|
||||
} catch (Exception e) {
|
||||
throw new InvalidArgumentException("Invalid service level. Please use the format defined by ISO 8601",
|
||||
throw new InvalidArgumentException("Invalid service level. Please use the format defined by ISO 8601. "
|
||||
+ "For example: \"P2D\" represents a period of \"two days.\" "
|
||||
+ "Or \"P2DT6H\" represents a period of \"two days and six hours.\"",
|
||||
e.getCause());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue