Skip to content

Commit e0aeb08

Browse files
committed
refactor(plugin-database-weaviate): remove redundant config validation
1 parent 2284032 commit e0aeb08

File tree

1 file changed

+1
-14
lines changed
  • src/plugins/plugin-database-weaviate

1 file changed

+1
-14
lines changed

src/plugins/plugin-database-weaviate/plugin.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import weaviate, {
3434
WeaviateClient,
3535
weaviateV2,
3636
} from 'weaviate-client'
37-
import { z } from 'zod'
3837
import { Database } from './database'
3938
import { Config, Context, configSchema } from './plugin.types'
4039
import { SchemaManager } from './SchemaManager'
@@ -84,19 +83,7 @@ export class WeaviateDatabase implements PluginLifecycle {
8483

8584
constructor() {}
8685

87-
initialize = async (config: Record<string, any>) => {
88-
try {
89-
this.config = configSchema.parse(config)
90-
} catch (e) {
91-
if (e instanceof z.ZodError) {
92-
throw new PluginLifecycle.ConfigurationError(
93-
config,
94-
e.issues.map((issue) => `'${issue.path}' ${issue.message}`),
95-
)
96-
}
97-
throw e
98-
}
99-
86+
initialize = async (config: Config) => {
10087
const { connection } = this.config
10188
const auth = connection.auth
10289

0 commit comments

Comments
 (0)