mirror of
https://github.com/Telecominfraproject/wlan-cloud-rrm.git
synced 2025-11-01 19:17:53 +00:00
Fix owprov API handler /inventory/<serial>?rrmSettings=true (#127)
Signed-off-by: Jeffrey Han <39203126+elludraon@users.noreply.github.com>
This commit is contained in:
@@ -690,6 +690,19 @@ public class UCentralClient {
|
|||||||
try {
|
try {
|
||||||
return gson.fromJson(response.getBody(), RRMDetails.class);
|
return gson.fromJson(response.getBody(), RRMDetails.class);
|
||||||
} catch (JsonSyntaxException e) {
|
} catch (JsonSyntaxException e) {
|
||||||
|
// catch strings like "no", "inherit", "invalid" (???)
|
||||||
|
JSONObject respBody;
|
||||||
|
try {
|
||||||
|
respBody = new JSONObject(response.getBody());
|
||||||
|
respBody.getString("rrm");
|
||||||
|
logger.error(
|
||||||
|
"RRMDetails returned unexpected string body: {}",
|
||||||
|
respBody
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
} catch (JSONException e2) { /* ignore and fall through */}
|
||||||
|
|
||||||
|
// otherwise, log as a deserialization error
|
||||||
String errMsg = String.format(
|
String errMsg = String.format(
|
||||||
"Failed to deserialize to RRMDetails: %s",
|
"Failed to deserialize to RRMDetails: %s",
|
||||||
response.getBody()
|
response.getBody()
|
||||||
|
|||||||
Reference in New Issue
Block a user