@@ -36,17 +36,9 @@ export const supabase_service: SupabaseClient = new Proxy(
|
|||||||
new SupabaseService(),
|
new SupabaseService(),
|
||||||
{
|
{
|
||||||
get: function (target, prop, receiver) {
|
get: function (target, prop, receiver) {
|
||||||
if (process.env.USE_DB_AUTHENTICATION === "false") {
|
|
||||||
Logger.debug(
|
|
||||||
"Attempted to access Supabase client when it's not configured."
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const client = target.getClient();
|
const client = target.getClient();
|
||||||
// If the Supabase client is not initialized, intercept property access to provide meaningful error feedback.
|
// If the Supabase client is not initialized, intercept property access to provide meaningful error feedback.
|
||||||
if (client === null) {
|
if (client === null) {
|
||||||
Logger.error(
|
|
||||||
"Attempted to access Supabase client when it's not configured."
|
|
||||||
);
|
|
||||||
return () => {
|
return () => {
|
||||||
throw new Error("Supabase client is not configured.");
|
throw new Error("Supabase client is not configured.");
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ x-common-service: &common-service
|
|||||||
- SCRAPING_BEE_API_KEY=${SCRAPING_BEE_API_KEY}
|
- SCRAPING_BEE_API_KEY=${SCRAPING_BEE_API_KEY}
|
||||||
- HOST=${HOST:-0.0.0.0}
|
- HOST=${HOST:-0.0.0.0}
|
||||||
- SELF_HOSTED_WEBHOOK_URL=${SELF_HOSTED_WEBHOOK_URL}
|
- SELF_HOSTED_WEBHOOK_URL=${SELF_HOSTED_WEBHOOK_URL}
|
||||||
|
- LOGGING_LEVEL=${LOGGING_LEVEL}
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user