return error when creating table fails (#4305)

pull/4289/head^2
Todd 2 years ago committed by GitHub
parent a61993abd7
commit b734c43cda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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))

Loading…
Cancel
Save