Improve error reporting back to the client.