-
Notifications
You must be signed in to change notification settings - Fork 375
Open
Description
File pages/web/domains/dns_dynhost/guide.en-ie.md doesn't explain any error(s) and etc. of the mentioned endpoint.
Right now I'm stuck pulling my hair out and trying to figure out what badsys
response with HTTP status code of 200
mean. There isn't even a curl command example given.
The IP of my subdomain didn't change in the panel, dig still points to the old IP I've set manually in the panel and google returns no useful results.
Java code (okHttp library) that repoduces my issue:
public void updateDnsOkHttp(String name, String target) throws Exception {
log.info("Creating okHttp request");
OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(null, new byte[0]);
final String url = baseUrl.replaceFirst("HOSTNAME", name + "." + configuration.BASE_DOMAIN).replaceFirst("IP", target);
Request request = new Request.Builder()
.url(url)
.post(body)
.header("Content-Length", "0")
.header("Authorization", Credentials.basic(configuration.OVH_USER, configuration.OVH_PASSWORD))
.build();
log.info("Executing request to: {}", url);
Response response = client.newCall(request).execute();
final String str = response.body().string();
log.info("Got response: {}", str);
final int code = response.code();
log.info("Got response code: {}", code);
if(code != 200) {
throw new Exception("Couldn't update DNS record, response code: " + code);
}
if(str.startsWith("badsys")) {
throw new Exception("Couldn't update DNS record");
}
}
```
Metadata
Metadata
Assignees
Labels
No labels