Give a bit more information from APIError to the client.

I did a bit of manual testing and it seems to work, but we don't really have anything set up to test this sort of thing -- most of the decorators in api.py have no test coverage.