live rewrite: catch errors from live rewrite and raise a new LiveResourceError with a 400 error code,
indicating bad request for live resource. Add test for invalid live rewrite requests