Skip to content

Commit

Permalink
MM-55450: Handle error in db migrate phase (mattermost#25430)
Browse files Browse the repository at this point in the history
We were not handling the error from initConnection.

https://mattermost.atlassian.net/browse/MM-55450
```release-note
NONE
```
  • Loading branch information
agnivade authored Nov 15, 2023
1 parent fee6606 commit 864046f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/channels/store/sqlstore/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ func NewMigrator(settings model.SqlSettings, dryRun bool) (*Migrator, error) {
wgMonitor: &sync.WaitGroup{},
}

ss.initConnection()
err := ss.initConnection()
if err != nil {
return nil, fmt.Errorf("error in initializing connection: %w", err)
}

ver, err := ss.GetDbVersion(true)
if err != nil {
Expand Down

0 comments on commit 864046f

Please sign in to comment.