Skip to content

Rethrow original error in _getSequelizeConnectionManager#349

Merged
animir merged 3 commits into266-support-sequelize-7from
copilot/sub-pr-347-again
Feb 7, 2026
Merged

Rethrow original error in _getSequelizeConnectionManager#349
animir merged 3 commits into266-support-sequelize-7from
copilot/sub-pr-347-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 7, 2026

In _getSequelizeConnectionManager, exceptions from this.client.connectionManager access were suppressed and replaced with a generic error message, obscuring the root cause when debugging Sequelize v7+ issues.

Changes

  • Capture the original error when accessing this.client.connectionManager throws
  • Rethrow the original error directly to preserve full error context
  • Add test coverage verifying original error is rethrown
// Before
throw new Error('Sequelize connection manager is not available');

// After
if (originalError) {
  throw originalError;
}
throw new Error('Sequelize connection manager is not available');

This preserves the complete diagnostic context from Sequelize v7+ by rethrowing the original error as-is, making troubleshooting connection manager failures easier while maintaining backward compatibility with older Sequelize versions.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: animir <4623196+animir@users.noreply.github.com>
Copilot AI changed the title [WIP] Update PR to address feedback on Sequelize 7 support Preserve original error as cause in _getSequelizeConnectionManager Feb 7, 2026
Copilot AI requested a review from animir February 7, 2026 15:27
Co-authored-by: animir <4623196+animir@users.noreply.github.com>
Copilot AI changed the title Preserve original error as cause in _getSequelizeConnectionManager Rethrow original error in _getSequelizeConnectionManager Feb 7, 2026
Copilot AI requested a review from animir February 7, 2026 15:34
@animir animir marked this pull request as ready for review February 7, 2026 15:43
@animir animir merged commit b64e010 into 266-support-sequelize-7 Feb 7, 2026
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.

2 participants