Fix tests

This commit is contained in:
Kegan Dougal 2020-06-25 14:38:44 +01:00
parent f07dfdca9f
commit dda2c278cd

View file

@ -91,6 +91,8 @@ func (r *FederationSenderInternalAPI) PerformJoin(
var httpErr gomatrix.HTTPError var httpErr gomatrix.HTTPError
if ok := errors.As(lastErr, &httpErr); ok { if ok := errors.As(lastErr, &httpErr); ok {
httpErr.Message = string(httpErr.Contents) httpErr.Message = string(httpErr.Contents)
// Clear the wrapped error, else serialising to JSON (in polylith mode) will fail
httpErr.WrappedError = nil
response.LastError = &httpErr response.LastError = &httpErr
} else { } else {
response.LastError = &gomatrix.HTTPError{ response.LastError = &gomatrix.HTTPError{