egave
egave3mo ago

Connect to managed databases from "INSIDE" of Deno Deploy

Hi I am trying to connect to a managed database from INSIDE another application in deno Deploy. But I have this error : ✖ Deployment failed. error: The deployment failed: UNCAUGHT_EXCEPTION TypeError: Non-default databases are not supported at Object.openKv (ext:deno_kv/01_db.ts:9:21) at file:///src/src/service/db.ts:2:23 Why shoudn't this be possible ?
1 Reply
Deno AI Helper
Deno AI Helper3mo ago
I apologize, but I wasn't able to find the answer to your question in the official Deno documentation. However, based on the error message you've provided, it seems like there might be an issue with the way you're trying to open a connection to a database. The error TypeError: Non-default databases are not supported suggests that the code is attempting to use a feature or access a database that is not supported by Deno Deploy's deno_kv namespace. Deno Deploy provides a built-in key-value store, and it seems like you might be trying to use a different database or a non-default configuration that is not compatible with Deno Deploy's restrictions. Please ensure that you are using the key-value store according to Deno Deploy's limitations and that you are not trying to open a connection to an unsupported managed database. You might need to use an external database service that provides an API accessible over HTTPS if you require database functionality beyond what's provided by Deno Deploy's key-value store. This advice is not based on the Deno documentation, so I recommend double-checking the accuracy of the advice given and consulting the Deno Deploy documentation or community for further assistance.