{"record":{"id":"f9f48ba29090ed7d","repo":"beekeeper-studio/beekeeper-studio","slug":"invalid-database-name","errorCode":null,"errorMessage":"Invalid database name","messagePattern":"Invalid database name","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/studio/src-commercial/backend/lib/db/clients/firebird.ts","lineNumber":275,"sourceCode":"    // Route through the SSH tunnel's local endpoint when a tunnel is active.\n    const host = this.server.sshTunnel\n      ? this.server.config.localHost\n      : this.server.config.host;\n    const port = this.server.sshTunnel\n      ? this.server.config.localPort\n      : this.server.config.port;\n\n    const config = {\n      host,\n      port,\n      user: this.server.config.user,\n      password: this.server.config.password,\n      database: this.database.database,\n      blobAsText: true,\n    };\n\n    if (typeof config.database !== \"string\" || config.database === \"\") {\n      throw new Error(\"Invalid database name\");\n    }\n\n    this.firebirdOptions = config;\n\n    log.debug(\"create driver client for firebird with config %j\", config);\n\n    this.pool =  new Pool(BksConfig.db.firebird.maxConnections, config);\n\n    const versionResult = await this.driverExecuteSingle(\n      \"SELECT RDB$GET_CONTEXT('SYSTEM', 'ENGINE_VERSION') from rdb$database;\"\n    );\n    this.version = versionResult.rows[0][\"RDB$GET_CONTEXT\"];\n\n    const serverConfig = this.server.config;\n    const knex = knexlib({\n      client: Client_Firebird,\n      connection: {\n        host,","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/beekeeper-studio/beekeeper-studio/blob/4e3e03e3223b2b71a1af8926d455f533b80af837/apps/studio/src-commercial/backend/lib/db/clients/firebird.ts#L257-L293","documentation":"FirebirdClient.connect validates that a database path/name was configured and throws 'Invalid database name' when config.database is not a non-empty string. Firebird requires a database file path or alias to open a connection, so an empty value cannot proceed.","triggerScenarios":"Opening a Firebird connection with the database field empty or set to a non-string value in the connection form or saved config.","commonSituations":"Imported or hand-edited connection configs missing the database path; users used to server-only auth flows leaving it blank; environment-specific configs where the path placeholder was never filled.","solutions":["Set the database field to a valid .FDB file path or a Firebird alias in the connection settings","Check saved connection config for an empty/missing database key","Verify the path exists on the server host and is reachable with the given credentials"],"exampleFix":"// before\n{ client: 'firebird', host: 'localhost', database: '' }\n// after\n{ client: 'firebird', host: 'localhost', database: '/data/employees.fdb' }","handlingStrategy":"validation","validationCode":"if (typeof config.database !== 'string' || config.database.trim() === '') {\n  throw new Error('Firebird connection requires a database file path or alias');\n}\nawait client.connect(config);","typeGuard":"function hasFirebirdDatabase(c: { database?: unknown }): c is { database: string } {\n  return typeof c.database === 'string' && c.database.length > 0;\n}","tryCatchPattern":"try {\n  await client.connect(config);\n} catch (err) {\n  if (err.message === 'Invalid database name') {\n    promptForDatabasePath();\n  } else throw err;\n}","preventionTips":["Always set the database field to a .FDB path or alias for Firebird","Validate connection forms before saving configs","Check imported configs for empty database keys"],"tags":["firebird","connection","validation","config"],"backgroundTag":"connection-config-invalid","analyzedSha":"4e3e03e3223b2b71a1af8926d455f533b80af837","analyzedAt":"2026-08-31T23:21:23.379Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}