* adds error handling for control groups to api service as post request middleware * adds waitFor to async middleware in api service to attempt to fix race conditions in tests Co-authored-by: Jordan Reimer <zofskeez@gmail.com>