The MatrixErrorInfo class should make the server response Json object accessible (if available).
For example, when encountering an error because of rate-limiting, the response informs the client, when it may retry. This information is necessary for well behaving clients.
See https://matrix.org/docs/spec/client_server/r0.4.0.html#rate-limiting