Skip to content

Neon PostgreSQL - New Components #16685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Neon PostgreSQL - New Components #16685

wants to merge 9 commits into from

Conversation

michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented May 15, 2025

Resolves #16620

Summary by CodeRabbit

  • New Features

    • Added actions for Neon Postgres: Delete Row(s), Execute SQL Query, Find Row, Find Row With Custom Query, Insert Row, Update Row, and Upsert Row.
    • Introduced sources to emit events for: New Row, New or Updated Row, New Row via Custom Query, New Table, and New Column in a table.
    • Enhanced integration with shared PostgreSQL configuration and methods for streamlined setup and database connectivity.
  • Chores

    • Updated package dependencies and versioning for improved compatibility and maintenance.

Copy link

vercel bot commented May 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview May 15, 2025 9:29pm
pipedream-docs ⬜️ Ignored (Inspect) May 15, 2025 9:29pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) May 15, 2025 9:29pm

Copy link
Contributor

coderabbitai bot commented May 15, 2025

"""

Walkthrough

A comprehensive Neon PostgreSQL integration is introduced, including a new app module, multiple actions for CRUD operations and custom queries, and sources for detecting new tables, columns, and rows. The implementation leverages and extends existing Pipedream PostgreSQL utilities, providing dynamic schema, table, and column selection, advanced error handling with SSL verification hints, and event-driven polling for database changes.

Changes

File(s) Change Summary
components/neon_postgres/neon_postgres.app.mjs Introduces Neon PostgreSQL app by extending Pipedream PostgreSQL definitions and methods, adds connection configuration with SSL logic.
components/neon_postgres/actions/delete-rows/delete-rows.mjs Adds "Delete Row(s)" action for deleting rows by column value with error handling including SSL verification failure hints.
components/neon_postgres/actions/execute-custom-query/execute-custom-query.mjs Adds "Execute SQL Query" action for running arbitrary SQL queries with result summary export.
components/neon_postgres/actions/find-row-custom-query/find-row-custom-query.mjs Adds "Find Row With Custom Query" action for parameterized SELECT queries with input validation and SSL error handling.
components/neon_postgres/actions/find-row/find-row.mjs Adds "Find Row" action for retrieving a row by column value with error handling and SSL verification failure hints.
components/neon_postgres/actions/insert-row/insert-row.mjs Adds "Insert Row" action for inserting a row with dynamic column-value mapping and SSL error handling.
components/neon_postgres/actions/update-row/update-row.mjs Adds "Update Row" action for updating a row by column value with provided new values and SSL verification failure hints.
components/neon_postgres/actions/upsert-row/upsert-row.mjs Adds "Upsert Row" action for inserting or updating a row based on conflict target column with parameterized query and SSL error handling.
components/neon_postgres/sources/common/common.mjs Adds a reusable base source module with polling and PostgreSQL client for Neon integration.
components/neon_postgres/sources/new-column/new-column.mjs Adds "New Column" source to emit events on new column addition in a table.
components/neon_postgres/sources/new-or-updated-row/new-or-updated-row.mjs Adds "New or Updated Row" source to emit events on row insertions or updates with unique event deduplication.
components/neon_postgres/sources/new-row-custom-query/new-row-custom-query.mjs Adds "New Row Custom Query" source to emit events based on user-defined SELECT queries with validation and uniqueness checks.
components/neon_postgres/sources/new-row/new-row.mjs Adds "New Row" source to emit events when new rows appear in a table, with uniqueness validation and event metadata.
components/neon_postgres/sources/new-table/new-table.mjs Adds "New Table" source to emit events on new table creation in a schema.
components/neon_postgres/package.json Updates version to 0.1.0 and adds dependencies for Pipedream platform and PostgreSQL libraries.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant NeonAction
    participant NeonApp
    participant NeonDB

    User->>NeonAction: Trigger action (e.g., Insert Row, Find Row)
    NeonAction->>NeonApp: Prepare connection/configuration
    NeonApp->>NeonDB: Execute SQL or perform operation
    NeonDB-->>NeonApp: Return result/error
    NeonApp-->>NeonAction: Return result/error
    NeonAction-->>User: Output result or error message
Loading
sequenceDiagram
    participant Source
    participant NeonApp
    participant NeonDB
    participant User

    Source->>NeonApp: Poll for changes (e.g., new row, column, table)
    NeonApp->>NeonDB: Query for changes
    NeonDB-->>NeonApp: Return new/updated data
    NeonApp-->>Source: Provide results
    Source-->>User: Emit event with metadata
Loading

Assessment against linked issues

Objective Addressed Explanation
Neon PostgreSQL app implements core actions: read schema, query DB, execute SQL (#16620)
Neon PostgreSQL actions match functionality of existing Postgres tools (#16620)

Poem

🐇
Neon lights and Postgres streams,
Now together—fulfilling dreams!
Rows appear and tables grow,
Columns change and queries flow.
With every hop, I watch and cheer—
Neon’s magic is finally here!

"""

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/neon_postgres/actions/execute-custom-query/execute-custom-query.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

components/neon_postgres/actions/insert-row/insert-row.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

components/neon_postgres/actions/delete-rows/delete-rows.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

  • 7 others

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between d792a55 and ea358df.

📒 Files selected for processing (10)
  • components/neon_postgres/actions/delete-rows/delete-rows.mjs (1 hunks)
  • components/neon_postgres/actions/execute-custom-query/execute-custom-query.mjs (1 hunks)
  • components/neon_postgres/actions/find-row-custom-query/find-row-custom-query.mjs (1 hunks)
  • components/neon_postgres/actions/find-row/find-row.mjs (1 hunks)
  • components/neon_postgres/actions/insert-row/insert-row.mjs (1 hunks)
  • components/neon_postgres/actions/update-row/update-row.mjs (1 hunks)
  • components/neon_postgres/sources/new-column/new-column.mjs (1 hunks)
  • components/neon_postgres/sources/new-or-updated-row/new-or-updated-row.mjs (1 hunks)
  • components/neon_postgres/sources/new-row-custom-query/new-row-custom-query.mjs (1 hunks)
  • components/neon_postgres/sources/new-table/new-table.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
  • components/neon_postgres/actions/find-row-custom-query/find-row-custom-query.mjs
  • components/neon_postgres/sources/new-row-custom-query/new-row-custom-query.mjs
  • components/neon_postgres/actions/execute-custom-query/execute-custom-query.mjs
  • components/neon_postgres/actions/find-row/find-row.mjs
  • components/neon_postgres/actions/delete-rows/delete-rows.mjs
  • components/neon_postgres/sources/new-column/new-column.mjs
  • components/neon_postgres/sources/new-or-updated-row/new-or-updated-row.mjs
  • components/neon_postgres/actions/update-row/update-row.mjs
  • components/neon_postgres/actions/insert-row/insert-row.mjs
  • components/neon_postgres/sources/new-table/new-table.mjs
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@michelle0927 michelle0927 marked this pull request as ready for review May 15, 2025 21:24
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (4)
components/neon_postgres/actions/delete-rows/delete-rows.mjs (1)

50-67: Consider extracting common error handling pattern

This error handling pattern appears to be repeated across multiple action components. Consider extracting it to a utility function to improve maintainability.

+ // In a shared utility file
+ export const handlePostgresError = (error) => {
+   let errorMsg = "Operation failed due to an error. ";
+   errorMsg += `${error}`.includes("SSL verification failed")
+     ? "This could be because SSL verification failed. To resolve this, reconnect your account and set SSL Verification Mode: Skip Verification, and try again."
+     : `${error}`;
+   return errorMsg;
+ }

// In this file
-    try {
-      const rows = await this.neon.deleteRows(
-        schema,
-        table,
-        column,
-        value,
-      );
-      $.export("$summary", `Deleted ${rows.length} rows from ${table}`);
-      return rows;
-    } catch (error) {
-      let errorMsg = "Row not deleted due to an error. ";
-      errorMsg += `${error}`.includes("SSL verification failed")
-        ? "This could be because SSL verification failed. To resolve this, reconnect your account and set SSL Verification Mode: Skip Verification, and try again."
-        : `${error}`;
-      throw new Error(errorMsg);
-    }
+    try {
+      const rows = await this.neon.deleteRows(
+        schema,
+        table,
+        column,
+        value,
+      );
+      $.export("$summary", `Deleted ${rows.length} rows from ${table}`);
+      return rows;
+    } catch (error) {
+      throw new Error(handlePostgresError(error).replace("Operation", "Row not deleted"));
+    }
components/neon_postgres/actions/find-row-custom-query/find-row-custom-query.mjs (1)

41-43: Enhance query validation message

The error message for non-SELECT queries could be more specific about this component's purpose and point users to alternative components for data modification.

     if (!query.toLowerCase().includes("select")) {
-      throw new Error("Need be a `SELECT` statement query. Read more about [SELECT queries here](https://www.w3schools.com/sql/sql_select.asp)");
+      throw new Error("This component only supports `SELECT` statement queries. For data modification, please use the 'Execute SQL Query' component instead. Read more about [SELECT queries here](https://www.w3schools.com/sql/sql_select.asp)");
     }
components/neon_postgres/sources/new-column/new-column.mjs (1)

34-37: Add logging for clarity on new column detection

Adding a log message would make it clearer in the execution logs when new columns are detected or when no changes are found.

     const newColumns = columns.filter((column) => !previousColumns.includes(column));
+    console.log(`Found ${newColumns.length} new columns in table ${this.table}`);
     for (const column of newColumns) {
       const meta = this.generateMeta(column);
       this.$emit(column, meta);
     }
components/neon_postgres/actions/insert-row/insert-row.mjs (1)

48-49: Enhance the summary message with details

The current summary message is generic. Adding details about which table and how many columns were affected would make the message more informative.

-      $.export("$summary", "New row inserted");
+      $.export("$summary", `New row inserted into ${table} with ${columns.length} column(s)`);
       return res;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 9bf3d09 and d792a55.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • components/neon_postgres/actions/delete-rows/delete-rows.mjs (1 hunks)
  • components/neon_postgres/actions/execute-custom-query/execute-custom-query.mjs (1 hunks)
  • components/neon_postgres/actions/find-row-custom-query/find-row-custom-query.mjs (1 hunks)
  • components/neon_postgres/actions/find-row/find-row.mjs (1 hunks)
  • components/neon_postgres/actions/insert-row/insert-row.mjs (1 hunks)
  • components/neon_postgres/actions/update-row/update-row.mjs (1 hunks)
  • components/neon_postgres/actions/upsert-row/upsert-row.mjs (1 hunks)
  • components/neon_postgres/neon_postgres.app.mjs (1 hunks)
  • components/neon_postgres/package.json (2 hunks)
  • components/neon_postgres/sources/common/common.mjs (1 hunks)
  • components/neon_postgres/sources/new-column/new-column.mjs (1 hunks)
  • components/neon_postgres/sources/new-or-updated-row/new-or-updated-row.mjs (1 hunks)
  • components/neon_postgres/sources/new-row-custom-query/new-row-custom-query.mjs (1 hunks)
  • components/neon_postgres/sources/new-row/new-row.mjs (1 hunks)
  • components/neon_postgres/sources/new-table/new-table.mjs (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Pull Request Checks
components/neon_postgres/actions/update-row/update-row.mjs

[error] 1-1: Error related to key 'neon_api_keys-update-row' found in this component.

components/neon_postgres/actions/insert-row/insert-row.mjs

[error] 1-1: Error related to key 'neon_api_keys-insert-row' found in this component.

components/neon_postgres/actions/find-row/find-row.mjs

[error] 1-1: Error related to key 'neon_api_keys-find-row' found in this component.

components/neon_postgres/actions/execute-custom-query/execute-custom-query.mjs

[error] 1-1: Error related to key 'neon_api_keys-execute-custom-query' found in this component.

components/neon_postgres/sources/new-row-custom-query/new-row-custom-query.mjs

[error] 1-1: Error related to key 'neon_api_keys-new-row-custom-query' found in this component.

components/neon_postgres/sources/new-column/new-column.mjs

[error] 1-1: Error related to key 'neon_api_keys-new-column' found in this component.

components/neon_postgres/sources/new-table/new-table.mjs

[error] 1-1: Error related to key 'neon_api_keys-new-table' found in this component.

components/neon_postgres/actions/delete-rows/delete-rows.mjs

[error] 1-1: Error related to key 'neon_api_keys-delete-rows' found in this component.

components/neon_postgres/actions/find-row-custom-query/find-row-custom-query.mjs

[error] 1-1: Error related to key 'neon_api_keys-find-row-custom-query' found in this component.

components/neon_postgres/sources/new-or-updated-row/new-or-updated-row.mjs

[error] 1-1: Error related to key 'neon_api_keys-new-or-updated-row' found in this component.

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (19)
components/neon_postgres/package.json (1)

3-3: LGTM: Version update and dependencies added

The version update to 0.1.0 and the addition of required dependencies look good. These dependencies align with the Neon PostgreSQL integration needs.

Also applies to: 14-17

components/neon_postgres/sources/common/common.mjs (1)

1-19: Well-structured common module for sources

Good implementation of a reusable base configuration for Neon Postgres source components. The approach of extending the common PostgreSQL source with Neon-specific properties follows good software design practices.

components/neon_postgres/actions/execute-custom-query/execute-custom-query.mjs (1)

1-28: Overall implementation looks good

The action is well-structured with appropriate props and execution logic. The SQL execution and results handling are implemented correctly.

🧰 Tools
🪛 GitHub Actions: Pull Request Checks

[error] 1-1: Error related to key 'neon_api_keys-execute-custom-query' found in this component.

components/neon_postgres/actions/update-row/update-row.mjs (2)

78-82: Good error handling for SSL verification

The error handling implementation is well done, especially the specific message for SSL verification failures which provides clear guidance to users on how to fix the issue.


1-85: Overall implementation is good

The action is well-structured with appropriate props for schema, table, column selection and value handling. The dynamic prop definitions that depend on previous selections provide a good user experience.

🧰 Tools
🪛 GitHub Actions: Pull Request Checks

[error] 1-1: Error related to key 'neon_api_keys-update-row' found in this component.

components/neon_postgres/actions/delete-rows/delete-rows.mjs (1)

67-73: Well-structured error handling with good user guidance

The error handling logic provides helpful guidance specifically for SSL verification issues, which is a common problem with database connections. This improves user experience by offering a clear solution path.

components/neon_postgres/actions/find-row/find-row.mjs (1)

50-76: Good error handling for SSL verification failures

The error handling is robust, especially with the helpful message for SSL verification failures that guides users to resolve the issue.

components/neon_postgres/sources/new-row-custom-query/new-row-custom-query.mjs (2)

70-77: Good validation for array values and placeholder matching

The validation logic properly checks that values is an array and that the number of placeholders matches the number of values, which prevents SQL injection and improves error messaging.


79-82: Good check for column uniqueness

Verifying that the selected column contains unique values is important for proper deduplication when emitting events.

components/neon_postgres/neon_postgres.app.mjs (2)

1-8: Clean integration with PostgreSQL package

Effectively imports and integrates with the @pipedream/postgresql package, allowing reuse of common PostgreSQL functionality while adding Neon-specific features.


11-27: Well-structured client configuration

The getClientConfiguration() method cleanly extracts auth parameters and applies SSL configuration, which centralizes connection setup for all Neon Postgres components.

components/neon_postgres/actions/upsert-row/upsert-row.mjs (2)

54-56: Good handling of update columns

Excluding the conflict target column from the update columns list is a best practice for upsert operations.


93-98: Consistent error handling

This error handling follows the same pattern as other components in the integration, providing helpful guidance for SSL verification issues.

components/neon_postgres/sources/new-table/new-table.mjs (1)

19-31: LGTM: Logic for detecting new tables is well implemented

The implementation correctly retrieves the current tables, compares against previously stored values, and emits events for new tables. The state management is properly handled with the _getPreviousValues() and _setPreviousValues() methods.

components/neon_postgres/sources/new-row/new-row.mjs (3)

6-10: LGTM: Component metadata is correctly defined

The component key "neon_postgres-new-row" follows the expected naming convention, and the component is correctly configured with appropriate metadata and dedupe settings.


42-52: LGTM: Deploy hook correctly handles column configuration

The deploy hook appropriately sets the column to either the user-specified column or the table's primary key, and initializes the state with existing rows.


69-77: LGTM: Run method properly validates column and processes new rows

The implementation correctly checks if the column contains unique values (crucial for proper deduplication) and throws a clear error message if duplicates exist. The method then processes new rows with the newRows helper.

components/neon_postgres/sources/new-or-updated-row/new-or-updated-row.mjs (2)

28-52: LGTM: Column props are well-defined with clear descriptions

The implementation correctly defines both an identifier column (for uniquely identifying rows) and a timestamp column (for detecting updates). The descriptions provide clear guidance to users about their purpose and expected values.


65-71: LGTM: Event metadata generation creates unique identifiers

The generateMeta method properly creates a unique ID by combining the identifier column value and the timestamp, which ensures proper event deduplication even when the same row is updated multiple times.

Copy link
Collaborator

@GTFalcao GTFalcao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left just one comment regarding reusing the error check that is very similar in several components.

} catch (error) {
let errorMsg = "Row not retrieved due to an error. ";
errorMsg += `${error}`.includes("SSL verification failed")
? "This could be because SSL verification failed. To resolve this, reconnect your account and set SSL Verification Mode: Skip Verification, and try again."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this error message check moved to a shared method or function imported by all these components? Perhaps the initial, unique error message for each component can be passed as a parameter to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Neon PostgreSQL
2 participants