* @param message
* the message to show if failed to created
*/
public static void propagateStatusCodeOnException(final HttpStatusCodeException ex, final String message) {
if (ex.getStatusCode().value() == 409) {
throw new ValidationException(ex.getStatusText());
}
throw new IllegalStateException(message);
}