From eabb9062686a38246ff7496270327cccc4b2f3fe Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 21 Dec 2022 17:52:07 +0100 Subject: [PATCH] [bugfix] fix media create error not being checked (#1283) --- internal/api/client/media/mediacreate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/client/media/mediacreate.go b/internal/api/client/media/mediacreate.go index dcaba5d5b..db8b2ea56 100644 --- a/internal/api/client/media/mediacreate.go +++ b/internal/api/client/media/mediacreate.go @@ -124,7 +124,7 @@ func (m *Module) MediaCreatePOSTHandler(c *gin.Context) { } apiAttachment, errWithCode := m.processor.MediaCreate(c.Request.Context(), authed, form) - if err != nil { + if errWithCode != nil { api.ErrorHandler(c, errWithCode, m.processor.InstanceGet) return }