feat(card_info): add tenant_id to CardInfoServiceConfig and include in API request headers - #353
Merged
Conversation
…n API request headers
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds tenant scoping support for outbound Card Info API calls by making the tenant ID configurable and sending it as a request header, alongside improving diagnostics for non-successful responses and a small serde visitor signature cleanup.
Changes:
- Add
tenant_idtoCardInfoServiceConfig(with defaults) and wire it intodevelopment.toml. - Include
x-tenant-idin Card Info API requests and log more detail on non-2xx responses. - Adjust serde visitor
expectingsignature for clarity/correctness.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/types/card/card_info_api.rs | Sends x-tenant-id header on Card Info API calls and expands non-2xx logging. |
| src/config.rs | Extends CardInfoServiceConfig with tenant_id + default; minor serde visitor signature fix. |
| config/development.toml | Adds tenant_id to the card_info_service config section for dev. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jagan-jaya
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for specifying a
tenant_idwhen making requests to the Card Info API, improves logging for non-successful API responses, and includes a minor code style fix. The main changes are grouped below by theme:Card Info API configuration and usage:
tenant_idfield to theCardInfoServiceConfigstruct and its default implementation, allowing the tenant ID to be configured in both code and thedevelopment.tomlconfig file. (src/config.rs,config/development.toml) [1] [2] [3]x-tenant-idheader, using the configuredtenant_idvalue. (src/types/card/card_info_api.rs)Logging improvements:
src/types/card/card_info_api.rs)Code style:
expectingmethod in a serde visitor implementation for clarity and correctness. (src/config.rs)req
res