mirror of
https://github.com/google/nomulus.git
synced 2025-05-21 19:59:34 +02:00
Update ICANN activity reporting logging (#808)
1. It appears that when we have a 200 response, the response content is garbled, but we don't care since we know the request is successful. When we have a 400 response, the response is indeed UTF-8 encoded. Print the stack trace of the HTTP exception doesn't help anymore. 2. The result code is a complex type which includes the xml element with all its attributes, which don't care. We only want to print the value.
This commit is contained in:
parent
7468a9915b
commit
054571a625
1 changed files with 1 additions and 5 deletions
|
@ -116,14 +116,10 @@ public class IcannHttpReporter {
|
||||||
// 1000 (i. e. success), there is no need to parse it.
|
// 1000 (i. e. success), there is no need to parse it.
|
||||||
if (response.getStatusCode() == HttpStatusCodes.STATUS_CODE_BAD_REQUEST) {
|
if (response.getStatusCode() == HttpStatusCodes.STATUS_CODE_BAD_REQUEST) {
|
||||||
success = false;
|
success = false;
|
||||||
// To debug if there is a problem with our parsing, we wrap the response and print the stack
|
|
||||||
// trace of it. As far as we can tell, the stack trace for such an exception contains the
|
|
||||||
// response content that is decoded correctly using the expected charset.
|
|
||||||
new HttpResponseException(response).printStackTrace();
|
|
||||||
XjcIirdeaResult result = parseResult(content);
|
XjcIirdeaResult result = parseResult(content);
|
||||||
logger.atWarning().log(
|
logger.atWarning().log(
|
||||||
"PUT rejected, status code %s:\n%s\n%s",
|
"PUT rejected, status code %s:\n%s\n%s",
|
||||||
result.getCode(), result.getMsg(), result.getDescription());
|
result.getCode().getValue(), result.getMsg(), result.getDescription());
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue