mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-05-25 14:34:22 +00:00
improved error handling
This commit is contained in:
parent
e1d39dc0f5
commit
4d5f7bed7d
@ -181,7 +181,7 @@ func send(c *gin.Context, attachmentTmpDir string, signalCliConfig string, numbe
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
cleanupTmpFiles(attachmentTmpPaths)
|
cleanupTmpFiles(attachmentTmpPaths)
|
||||||
if strings.Contains(err.Error(), signalCliV2GroupError) {
|
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 {
|
} else {
|
||||||
c.JSON(400, Error{Msg: err.Error()})
|
c.JSON(400, Error{Msg: err.Error()})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user