Add rate limiting information, and serialise responses properly (including errors)