Operation op = httpFrame.getOperation();
OperationMap response = op.get("response", OperationMap.class);
int statusCode = (response == null) ? (-1) : response.getInt(STATUS_CODE_ATTR, (-1));
if ((statusCode >= 0) && httpStatusIsError(statusCode)) {
return new TraceError(createErrorMessage(statusCode, response.get(REASON_PHRASE_ATTR, String.class)));
}
OperationMap request = op.get("request", OperationMap.class);
Boolean contextAvailable = (request == null) ? null : request.get(OperationFields.CONTEXT_AVAILABLE, Boolean.class);
if ((contextAvailable != null) && (!contextAvailable.booleanValue())) {