diff --git a/src/sql/mysql/MySQLConnection.zig b/src/sql/mysql/MySQLConnection.zig index acbc27fd99..0727741e8f 100644 --- a/src/sql/mysql/MySQLConnection.zig +++ b/src/sql/mysql/MySQLConnection.zig @@ -232,7 +232,7 @@ pub fn onConnectionTimeout(this: *@This()) bun.api.Timer.EventLoopTimer.Arm { .authenticating, .authentication_awaiting_pk, => { - this.failFmt(error.ConnectionTimedOut, "Connection timed out after {} (during authentication)", .{bun.fmt.fmtDurationOneDecimal(@as(u64, this.connection_timeout_ms) *| std.time.ns_per_ms)}); + this.failFmt(error.ConnectionTimedOut, "Connection ttimeout after {} (during authentication)", .{bun.fmt.fmtDurationOneDecimal(@as(u64, this.connection_timeout_ms) *| std.time.ns_per_ms)}); }, } return .disarm; @@ -774,7 +774,7 @@ fn SocketHandler(comptime ssl: bool) type { } pub fn onTimeout(this: *MySQLConnection) void { - this.fail("Connection timed out", error.ConnectionTimedOut); + this.fail("Connection timeout", error.ConnectionTimedOut); } pub fn onDrain(this: *MySQLConnection) void { diff --git a/src/sql/postgres/PostgresSQLConnection.zig b/src/sql/postgres/PostgresSQLConnection.zig index 725dacddff..6689d044ae 100644 --- a/src/sql/postgres/PostgresSQLConnection.zig +++ b/src/sql/postgres/PostgresSQLConnection.zig @@ -219,7 +219,7 @@ pub fn onConnectionTimeout(this: *PostgresSQLConnection) bun.api.Timer.EventLoop this.failFmt("ERR_POSTGRES_CONNECTION_TIMEOUT", "Connection timeout after {}", .{bun.fmt.fmtDurationOneDecimal(@as(u64, this.connection_timeout_ms) *| std.time.ns_per_ms)}); }, .sent_startup_message => { - this.failFmt("ERR_POSTGRES_CONNECTION_TIMEOUT", "Connection timed out after {} (sent startup message, but never received response)", .{bun.fmt.fmtDurationOneDecimal(@as(u64, this.connection_timeout_ms) *| std.time.ns_per_ms)}); + this.failFmt("ERR_POSTGRES_CONNECTION_TIMEOUT", "Connection timeout after {} (sent startup message, but never received response)", .{bun.fmt.fmtDurationOneDecimal(@as(u64, this.connection_timeout_ms) *| std.time.ns_per_ms)}); }, } return .disarm; diff --git a/test/js/sql/sql.test.ts b/test/js/sql/sql.test.ts index 57740fa7eb..7b7c7abce4 100644 --- a/test/js/sql/sql.test.ts +++ b/test/js/sql/sql.test.ts @@ -2630,7 +2630,7 @@ if (isDockerEnabled()) { expect(e).toBeInstanceOf(SQL.SQLError); expect(e).toBeInstanceOf(SQL.PostgresError); expect(e.code).toBe("ERR_POSTGRES_CONNECTION_TIMEOUT"); - expect(e.message).toMatch(/Connection timed out after 200ms/); + expect(e.message).toMatch(/Connection timeout after 200ms/); } finally { sql.close(); server.close();