improved error handling

This commit is contained in:
Bernhard B
2021-01-17 09:49:12 +01:00
parent e1d39dc0f5
commit 4d5f7bed7d

View File

@@ -181,7 +181,7 @@ func send(c *gin.Context, attachmentTmpDir string, signalCliConfig string, numbe
if err != nil {
cleanupTmpFiles(attachmentTmpPaths)
if strings.Contains(err.Error(), signalCliV2GroupError) {
c.JSON(400, Error{Msg: "Cannot create group - please first update your profile."})
c.JSON(400, Error{Msg: "Cannot send message to group - please first update your profile."})
} else {
c.JSON(400, Error{Msg: err.Error()})
}