Skip to content

fix: add helpful hint for SSL errors suggesting MULTICELL_ACCOUNT_PREFIX#581

Open
b-per wants to merge 1 commit intomainfrom
fix-error-message-multicell
Open

fix: add helpful hint for SSL errors suggesting MULTICELL_ACCOUNT_PREFIX#581
b-per wants to merge 1 commit intomainfrom
fix-error-message-multicell

Conversation

@b-per
Copy link
Collaborator

@b-per b-per commented Feb 4, 2026

Summary

Users on multi-cell dbt platform instances who forget to set MULTICELL_ACCOUNT_PREFIX get cryptic SSL certificate errors like:

HTTPSConnectionPool(host='ji993.us1.dbt.com', port=443): Max retries exceeded with url: /oauth/token (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1081)')))

This PR adds a helpful hint pointing to the documentation when SSL errors are detected during OAuth flows.

Changes

  • New src/dbt_mcp/errors/hints.py module with centralized hint logic
  • Updated error handling in:
    • settings.py - token refresh and login errors
    • fastapi_app.py - OAuth callback errors
    • token_provider.py - background token refresh errors

Example output

When an SSL error occurs, users will now see:

SSLError: certificate verify failed...

Hint: If you are on a multi-cell dbt platform instance, you may need to set the MULTICELL_ACCOUNT_PREFIX environment variable. See https://docs.getdbt.com/docs/dbt-ai/setup-local-mcp#api-and-sql-tool-settings

Test plan

  • Added unit tests for SSL error detection and hint logic
  • All existing tests pass

@b-per b-per requested review from a team, jairus-m and jasnonaz as code owners February 4, 2026 14:18
Users on multi-cell dbt platform instances who forget to set
MULTICELL_ACCOUNT_PREFIX get cryptic SSL certificate errors. This
adds a helpful hint pointing to the documentation when SSL errors
are detected during:
- OAuth token fetch/refresh
- OAuth callback
- Background token refresh

The hint is centralized in errors/hints.py to avoid duplication.
@b-per b-per force-pushed the fix-error-message-multicell branch from 1e2bffc to 1f2c28a Compare February 4, 2026 14:22
@b-per b-per requested a review from a team as a code owner February 4, 2026 14:22
)


def looks_like_ssl_error(error: Exception) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you meant to use this in with_multicell_hint

Copy link
Collaborator

@DevonFulcher DevonFulcher left a comment

Choose a reason for hiding this comment

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

Nice!

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