-
Bug
-
Resolution: Done
-
Major
-
None
I found difference in behavior of DMR in GWT debug from behavior in compiled form, when code in HAL try to read not existing attribute or attribute of not existing node:
// reading not existing attribute of /
ModelNode operation = new ModelNode();
operation.get(ADDRESS).set(new ModelNode());
operation.get(NAME).set("notexisting");
operation.get(OP).set(READ_ATTRIBUTE_OPERATION);
dispatcher.execute(new DMRAction(operation), new LoggingCallback<DMRResponse>() {
public void onSuccess(DMRResponse response) {
ModelNode outcome = response.get().get(ModelDescriptionConstants.OUTCOME);
if(outcome.asString().equals(ModelDescriptionConstants.SUCCESS)){
// ...
}else{
// **This will be executed in GWT debug mode**
}
}
public void onFailure(Throwable caught) {
// **This will be executed in production**
}
});
Root of the problem is in statusCode of HTTP response - in production is 500, but in GWT debug is 200:
https://github.com/hal/core/blob/c615533231134be8f295c08a6e39e70b58604bf2/dmr/src/main/java/org/jboss/dmr/client/dispatch/impl/DMRHandler.java#L219
But I dont know where this can be repaired.