move creation of error result to enginesosapi