dear support team
We use cf-nodejs-client to control the start and stop of hana cloud db, but an error occurred.
How can I fix this error? Does cf-nodejs-client have the feature of controlling hana cloud db?
source code:
"use-strict";
const cron = require("node-cron");
const endpoint = "";
const username = "";
const password = "";
const CloudController = new (require("cf-nodejs-client")).CloudController(endpoint);
const UsersUAA = new (require("cf-nodejs-client")).UsersUAA;
const ServiceInstances = new (require("cf-nodejs-client")).ServiceInstances(endpoint);
controlTarget(ServiceInstances, "stop", name, id);
function controlTarget(target, operation, name, id) {
CloudController.getInfo().then((result) => {
UsersUAA.setEndPoint(result.authorization_endpoint);
return UsersUAA.login(username, password);
}).then((result) => {
target.setToken(result);
return target.stop(id);
}).then((result) => {
console.log(result);
}).catch((reason) => {
console.log("[catch block]: " + reason);
});
};
error:
[catch block]: {
"description": "Service broker error: Service broker hana-cloud failed with: Internal error [ref 2TJgeT5Gp5ZblIEXLjSoSbzN4ko]",
"error_code": "CF-ServiceBrokerRequestRejected",
"code": 10001,
"http": {
"method": "PATCH",
"status": 422
}
}