Effect CommunityEC
Effect Community2y ago
1 reply
lagrange6

### Title: Troubleshooting "Unknown Message: 74" Error in SQL Client with Socket Connection

When I create an SQL client with a socket

import { Config, Effect, Struct, pipe } from "effect" import { PgClient } from "@effect/sql-pg" import { SqlClient } from "@effect/sql" import * as Secret from "effect/Secret"; const SqlLive = PgClient.layer({ database: Config.succeed("local"), username: Config.succeed("root"), password: Config.succeed( Secret.fromString("root")), path: Config.succeed("/Users/xxxxxx/Library/Application Support/Local/run/xxxxxxxx/mysql/mysqld.sock") }) const program = Effect.gen(function* () { const sql = yield* SqlClient.SqlClient const id = yield* sql<{ readonly id: number[] }>SELECT id FROM wp_35_posts yield* Effect.log(Got ${id} results!) }) pipe(program, Effect.provide(SqlLive), Effect.runPromise)

I got this error.

Postgres.js : Unknown Message: 74 Postgres.js : Unknown Message: 74 Postgres.js : Unknown Message: 74 Postgres.js : Unknown Message: 74

Question
What does this error imply?
How do I fix it?
Was this page helpful?