Hacker News new | ask | show | jobs
by jedberg 3681 days ago
The middleware would be best option. Put it between your code and the calls and then have it able to throw random errors.

But it means you have to write the middleware and have it be it's own source of bugs, which is still better than nothing, but another risk.