store the apierror as an interface{} on response.

This lets you set the error type on the client, and let the client create the error for decoding on each non-successful request.