mirror of
				https://github.com/Telecominfraproject/wlan-cloud-rrm.git
				synced 2025-10-30 18:17:58 +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 { | ||||
| 			return gson.fromJson(response.getBody(), RRMDetails.class); | ||||
| 		} 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( | ||||
| 				"Failed to deserialize to RRMDetails: %s", | ||||
| 				response.getBody() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jeffrey Han
					Jeffrey Han