From dae53d42c7cc244ab7c87e0b2bf596ba0425672e Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 25 Aug 2024 00:54:08 +0300 Subject: [PATCH] bridgev2: add standard error for unsupported media types --- bridgev2/errors.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bridgev2/errors.go b/bridgev2/errors.go index 2834b298..e80377cf 100644 --- a/bridgev2/errors.go +++ b/bridgev2/errors.go @@ -53,6 +53,7 @@ var ( ErrDatabaseError error = WrapErrorInStatus(errors.New("database error")).WithMessage("internal database error").WithIsCertain(true).WithSendNotice(true) ErrTargetMessageNotFound error = WrapErrorInStatus(errors.New("target message not found")).WithErrorAsMessage().WithIsCertain(true).WithSendNotice(false) ErrUnsupportedMessageType error = WrapErrorInStatus(errors.New("unsupported message type")).WithErrorAsMessage().WithIsCertain(true).WithSendNotice(true) + ErrUnsupportedMediaType error = WrapErrorInStatus(errors.New("unsupported media type")).WithErrorAsMessage().WithIsCertain(true).WithSendNotice(true) ErrMediaDownloadFailed error = WrapErrorInStatus(errors.New("failed to download media")).WithMessage("failed to download media").WithIsCertain(true).WithSendNotice(true) ErrMediaReuploadFailed error = WrapErrorInStatus(errors.New("failed to reupload media")).WithMessage("failed to reupload media").WithIsCertain(true).WithSendNotice(true) ErrMediaConvertFailed error = WrapErrorInStatus(errors.New("failed to convert media")).WithMessage("failed to convert media").WithIsCertain(true).WithSendNotice(true)