Skip to content

Commit

Permalink
Log metadata when upload fails
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Mar 4, 2024
1 parent b763dce commit 22aa162
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions msgconv/from-matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ func (mc *MessageConverter) reuploadFileToMeta(ctx context.Context, evt *event.E
IsVoiceClip: isVoice,
})
if err != nil {
zerolog.Ctx(ctx).Debug().
Str("file_name", fileName).
Str("mime_type", mimeType).
Bool("is_voice_clip", isVoice).
Msg("Failed upload metadata")
return nil, fmt.Errorf("%w: %w", ErrMediaUploadFailed, err)
}
return resp, nil
Expand Down

0 comments on commit 22aa162

Please sign in to comment.