From b923a39d76a59033c143bec80b438d2aba4f0fb5 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 31 Aug 2022 11:10:39 +0300 Subject: [PATCH] Fix media conversion errors not including actual error --- portal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portal.go b/portal.go index a166838..0f0fc8a 100644 --- a/portal.go +++ b/portal.go @@ -2974,7 +2974,7 @@ func (portal *Portal) preprocessMatrixMedia(ctx context.Context, sender *User, r // Everything is allowed } if convertErr != nil { - return nil, util.NewDualError(fmt.Errorf("%w (%s to %s)", errMediaConvertFailed, mimeType, content.Info.MimeType), err) + return nil, util.NewDualError(fmt.Errorf("%w (%s to %s)", errMediaConvertFailed, mimeType, content.Info.MimeType), convertErr) } uploadResp, err := sender.Client.Upload(ctx, data, mediaType) if err != nil {