Represents error result coming from Operation.perform(..) method.
- Version:
 - 17.1.1
 
- Source:
 
Methods
(static) Failure#getAdditionalInfo() → {Object}
stable API
Gets additional information which can be used to pass any other proprietary information into client's OperationResult handler.
- Version:
 - 17.1.1
 
- Source:
 
Returns:
- Type
 - Object
 
Example
Performs an existing Operation and use additional information to behave appropriately in OperationResult handler.
var employee = Abcs.Entities().findById('my.custom.bop.Employee');
var operation = Abcs.Operations().create({
    entity: employee,
    record: {
        firstName: 'Martin',
        lastName: 'Janicek',
        age: 28
    }
});
operation.perform().then(function(operationResult) {
    // Do something when your operation succeed
}).catch(function(operationResult) {
    if (operationResult.isFailure()) {
        // Let's assume that Operation implementor included Object literal with 'log' field for better error tracing
        var additionalInfo = operationResult.getAdditionalInfo();
        var log = additionalInfo.log;
        if (log) {
            // Insert code you want to perform if record creation failed and 'log' info is available
        }
    }
});
            
        
            
                
    
    
        (static) Failure#getCode() → {Number}
stable API
Gets the OperationResult.Failure code for identification of what type of error caused Operation.perform(..) method to fail.
- Version:
 - 17.1.1
 
- Source:
 
Returns:
- Type
 - Number
 
(static) Failure#getMessage() → {String}
stable API
Gets the message describing why Operation.perform(..) method failed.
- Version:
 - 17.1.1
 
- Source:
 
Returns:
- Type
 - String