Skip to content

Preserve error context in _getSequelizeConnectionManager#348

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

Preserve error context in _getSequelizeConnectionManager#348
animir merged 4 commits into266-support-sequelize-7from
copilot/sub-pr-347

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 7, 2026

Addresses feedback on #347 regarding error handling in _getSequelizeConnectionManager. When accessing connectionManager throws (Sequelize v7+) and no fallback is available, the original error was silently swallowed, making misconfiguration harder to debug.

Changes:

  • Capture exceptions thrown when accessing this.client.connectionManager
  • Rethrow the original error object when both connection manager paths fail
  • Preserve existing behavior when no access error occurs

Before:

throw new Error('Sequelize connection manager is not available');
// Original error context lost

After:

if (accessError) {
  throw accessError; // Preserves full error object, stack trace, and all properties
}
throw new Error('Sequelize connection manager is not available');

This approach preserves the complete error context including the stack trace, making debugging significantly easier when misconfiguration occurs.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 7, 2026 15:24
Co-authored-by: animir <4623196+animir@users.noreply.github.com>
Co-authored-by: animir <4623196+animir@users.noreply.github.com>
Copilot AI changed the title [WIP] Update implementation based on Sequelize 7 support feedback Preserve error context 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 requested a review from animir February 7, 2026 15:33
@animir animir marked this pull request as ready for review February 7, 2026 15:42
@animir animir merged commit b4d3681 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