see #16: fix error serialization so that server-side errors can be sent back to the client proxy