Don't 500

This commit is contained in:
rxdn 2024-11-17 15:21:02 +00:00
parent 1f043ed65f
commit fd1dbf7798

View File

@ -100,9 +100,13 @@ func DeletePanel(c *gin.Context) {
messageId, err := messageData.send(botContext, panels)
if err != nil {
var unwrapped request.RestError
if !errors.As(err, &unwrapped) || !unwrapped.IsClientError() {
_ = c.AbortWithError(http.StatusInternalServerError, app.NewServerError(err))
return
}
// TODO: nil message ID?
}
if err := database.Client.MultiPanels.UpdateMessageId(c, multiPanel.Id, messageId); err != nil {
_ = c.AbortWithError(http.StatusInternalServerError, app.NewServerError(err))