Pass fail result as error to callback as second parameter