Skip to content

fix: return empty list instead of raising error when integrationDepen… - #235

Merged
cassiofariasmachado merged 7 commits into
SAP:mainfrom
smahr:main
Aug 3, 2026
Merged

fix: return empty list instead of raising error when integrationDepen…#235
cassiofariasmachado merged 7 commits into
SAP:mainfrom
smahr:main

Conversation

@KoblerS

@KoblerS KoblerS commented Jul 20, 2026

Copy link
Copy Markdown
Member

Disclaimer: Do not include SAP-internal or customer-specific information in this PR (e.g. internal system URLs, customer names, tenant IDs, or confidential configurations). This is a public repository.

Description

Changes get_mcp_tools_customer to return an empty list instead of raising AgentGatewaySDKError when integrationDependencies is empty in the credentials. An empty dependency list is a valid configuration (no MCP servers to connect to), so raising an error was unnecessarily strict. A warning is logged instead to surface the misconfiguration to the user.

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

How to Test

  1. Create CustomerCredentials with integration_dependencies=[]
  2. Call get_mcp_tools_customer(credentials, token, timeout)
  3. Expected result: returns [] without raising an error; a warning is logged

Checklist

  • I have read the Contributing Guidelines
  • I have verified that my changes solve the issue
  • I have added/updated automated tests to cover my changes
  • All tests pass locally
  • I have verified that my code follows the Code Guidelines
  • I have updated documentation (if applicable)
  • I have added type hints for all public APIs
  • My code does not contain sensitive information (credentials, tokens, etc.)
  • I have followed Conventional Commits for commit messages

Breaking Changes

None — previously this raised an error, so callers that previously needed a try/except can simplify, but no existing working code breaks.

@KoblerS
KoblerS requested a review from a team as a code owner July 20, 2026 06:29
@NicoleMGomes

Copy link
Copy Markdown
Contributor

Please verify failing checks and fulfill PR template (we have a command on claude to facilitate it /release-prep).

KoblerS and others added 4 commits July 31, 2026 13:57
Older MCP versions yield (read, write), newer versions yield
(read, write, get_session_id). Use *_ to unpack safely across both.
…sError in tool results

- Use *_ to unpack streamable_http_client tuples for MCP 2-tuple/3-tuple compat
- Add _log_mcp_server_error helper that unwraps BaseExceptionGroup to surface
  the actual HTTP status code and response body from gateway errors
- Log result.isError=true tool responses at ERROR level instead of silently returning
NicoleMGomes
NicoleMGomes previously approved these changes Aug 2, 2026
@KoblerS
KoblerS requested a review from NicoleMGomes August 3, 2026 13:10
@cassiofariasmachado
cassiofariasmachado merged commit a558a8e into SAP:main Aug 3, 2026
11 checks passed
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.

3 participants