Open paulinetheitgirl opened 6 years ago
You probably long figured this out but yes and no. If you're manually calling log
then there's nothing stopping you but if you use stuff like logExposure
then your log function will be called without await
and thus no way to handle errors. I'd take a look at the code in experiment.js
and write your own logExposureAsync
based on what's there for now.
If I call my own API inside the
log()
andpreviouslyLogged()
, is it possible to use Promises or async/await to get the result of the API call? For example if I want to have an endpoint that writes the event to an external log insidelog()
, and then another endpoint that reads the log to determine if the event waspreviouslyLogged()
.