Budibase/budibase · error · Error
${messages.join("\n")}
Error message
${messages.join("\n")} What it means
microsoftSqlServer's connect() wraps mssql (tedious) connection failures: when the thrown error carries originalError.errors (tedious aggregates multiple errors), the handler collects the top-level err.message plus each nested error's message and throws a single Error with them joined by newlines. This surfaces all validation/auth/network problems reported during the connection attempt.
Source
Thrown at packages/server/src/integrations/microsoftSqlServer.ts:353
}
case null:
case undefined:
break
default:
utils.unreachable(this.config)
}
const pool = new sqlServer.ConnectionPool(clientCfg)
this.client = await pool.connect()
} catch (err: any) {
if (err?.originalError?.errors?.length) {
const messages = []
if (err.message) {
messages.push(err.message)
}
messages.push(...err.originalError.errors.map((e: any) => e.message))
throw new Error(messages.join("\n"))
}
throw err
}
}
async internalQuery(
query: SqlQuery,
operation: string | undefined = undefined
) {
const client = this.client!
const request = client.request()
this.index = 0
try {
if (Array.isArray(query.bindings)) {
let count = 0
for (let binding of query.bindings) {
request.input(`p${count++}`, binding)View on GitHub (pinned to a81a902e9a)
Solutions
- Read the joined messages — they contain the actual login/network error from SQL Server — and fix the underlying cause
- Verify host, port, instance, user, password and database in the datasource config
- Set encrypt/trustServerCertificate options appropriately for your TLS setup
- Confirm network reachability (firewall, port 1433, named-instance UDP 1434) from the Budibase host
Example fix
// before: connection fails with certificate error
const config = { server, user, password, database } // encrypt defaults to true
// after
const config = { server, user, password, database, options: { encrypt: true, trustServerCertificate: true } } When it happens
Trigger: mssql.connect() fails with an aggregate error: bad credentials (login failed), unreachable host/port, TLS negotiation failure, invalid database name, or certificate trust errors — anything where err.originalError.errors is a non-empty array.
Common situations: SQL Server not accepting remote TCP connections; wrong username/password or Windows-only auth attempted from Linux; self-signed certificates without encrypt=false or trustServerCertificate; firewall blocking port 1433; wrong instance name for a named instance.
Related errors
- Failed to connect to resolved IP for ${hostname}: unknown ne
- Unable to connect without URL or database
- ${readableMessage}
- ${err.message}
- Redis error: ${err}
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/58894299b11d06e6.
Report an issue: GitHub.