[promise] Mock API use in simple example
[promise] Expose the mock functionality as error handling