if (status == Http.Status.OK.statusCode) {
return Unit.unit;
} else if (status == Http.Status.FORBIDDEN.statusCode) {
throw HttpUtil.insufficientPrivileges(status, bytes);
} else if (status == Http.Status.UNPROCESSABLE_ENTITY.statusCode) {
throw new RequestFailedException("Invalid process type", status, bytes);
} else if (status == Http.Status.PAYMENT_REQUIRED.statusCode) {
throw new RequestFailedException("Payment is required for scaling this process. " +
"Please go to https://api.heroku.com and check your account details.", status, bytes);
} else {
throw new RequestFailedException("Error occurred while scaling.", status, bytes);
}
}