You are working on the hyperswitch repository (Rust payment processing system).…
- User
You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
- Repository: juspay/hyperswitch
- Working directory: ./repos/hyperswitch_pool_9 (already cloned)
- Base commit: aae1994ea147fa1ebdc9555f00b072bb9ed57abc
- Task ID: juspay__hyperswitch-8971
- Version: v1.116.0
TASK DESCRIPTION: Bug: refactor(routing): receive json value instead of string
DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
Refactoring to recieve json response instead of string
Updated
ConfigApiClient::send_decision_engine_requestcalls incrates/router/src/core/routing/helpers.rsto returnserde_json::Valueinstead ofString. This ensures the response is parsed as JSON for better type safety and avoids manual string-to-JSON conversions in downstream logic.Changes Made
-
Replaced generic type parameter
Stringwithserde_json::Valuein the following functions:enable_decision_engine_dynamic_routing_setupupdate_decision_engine_dynamic_routing_setupdisable_decision_engine_dynamic_routing_setupcreate_decision_engine_merchantdelete_decision_engine_merchant
Purpose
Switching to
serde_json::Valuedirectly improves clarity, reduces redundant parsing, and enforces better response handling.Screenshot
create
update
delete
Curls and responses
create
code Assistant
I'll help you implement this refactoring task to change the
ConfigApiClient::send_decision_engine_requestcalls to returnserde_json::Valueinstead ofString. Let me start by understanding the current codebase structure and locating the relevant files.Assistant
(no content)
Assistant
I'll work on this refactoring task to change
ConfigApiClient::send_decision_engine_requestcalls to returnserde_json::Valueinstead ofString. Let me start by exploring the codebase to find the relevant files.Assistant
Now let me read this file to understand the current implementation:
Assistant
Let me search for the ConfigApiClient and the specific functions mentioned in the task:
Assistant
Let me search more specifically for the functions mentioned in the task:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.