return error when creating table fails (#4305)

This commit is contained in:
Todd authored and GitHub committed 2024-01-26 10:46:29 -08:00
1 parent a61993abd7
commit b734c43cda
1 file changed
+1 -1
+1 -1
View File
@@ -45,7 +45,7 @@ func Open(ctx context.Context, opt ...Option) (*db.DB, error) {
switch {
case opts.withDbType == dbw.Sqlite:
if err := createTables(ctx, conn); err != nil {
errors.Wrap(ctx, err, op)
return nil, errors.Wrap(ctx, err, op)
}
default:
return nil, errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("%q is not a supported cache store type", opts.withDbType))