mattermost4j
mattermost4j copied to clipboard
ApiResponse#hasError() always returns true when ignoreUnknownProperty is set
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");
}
Same Issue here. A cheap workaround:
apiResp.getRawResponse().getStatusInfo().getFamily() == Family.SUCCESSFUL