Maintained Apps: Add missing error check (#24340)

Found while setting up for another ticket.
This commit is contained in:
Martin Angers
2024-12-03 16:11:57 -05:00
committed by GitHub
parent f2850f04bc
commit 0b57c7ab2e
+4 -1
View File
@@ -53,9 +53,12 @@ ON DUPLICATE KEY UPDATE
// upsert the maintained app
res, err := tx.ExecContext(ctx, upsertStmt, app.Name, app.Token, app.Version, app.Platform, app.InstallerURL,
app.SHA256, app.BundleIdentifier, installScriptID, uninstallScriptID)
if err != nil {
return ctxerr.Wrap(ctx, err, "upsert maintained app")
}
id, _ := res.LastInsertId()
appID = uint(id) //nolint:gosec // dismiss G115
return ctxerr.Wrap(ctx, err, "upsert maintained app")
return nil
})
if err != nil {
return nil, err