mattermost4j icon indicating copy to clipboard operation
mattermost4j copied to clipboard

ApiResponse#hasError() always returns true when ignoreUnknownProperty is set

Open maruTA-bis5 opened this issue 4 years ago • 1 comments

Steps to reproduce

var client = MattermostClient.builder().url(url).ignoreUnknownProperty().build();
ApiResponse<Map<String, String>> clientConfig = client.getOldClientConfig();
if (clientConfig.hasError()) { // return true when response is "200 OK"
    throw new IllegalStateException("message");
}

maruTA-bis5 avatar Apr 26 '20 23:04 maruTA-bis5

Same Issue here. A cheap workaround:

apiResp.getRawResponse().getStatusInfo().getFamily() == Family.SUCCESSFUL

chebureki avatar Aug 20 '21 10:08 chebureki