summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-12-21 17:52:07 +0100
committerLibravatar GitHub <noreply@github.com>2022-12-21 17:52:07 +0100
commiteabb9062686a38246ff7496270327cccc4b2f3fe (patch)
tree2d970234ccfe31cc1984606770bc6a585b5cc409
parent[bugfix] Close reader gracefully when streaming recache of remote media to fi... (diff)
downloadgotosocial-eabb9062686a38246ff7496270327cccc4b2f3fe.tar.xz
[bugfix] fix media create error not being checked (#1283)
-rw-r--r--internal/api/client/media/mediacreate.go2
1 files changed, 1 insertions, 1 deletions
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
}