You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix[bug]: handle non-JSON responses and query params in REST tools (#3855, #3857) (#3873)
* fix: handle non-JSON responses and query params in REST tools (#3855, #3857)
Backend:
- Add _handle_json_parse_error() for graceful fallback when REST APIs return
HTML, plain text, XML, or responses with encoding issues
- Catch json.JSONDecodeError, orjson.JSONDecodeError, UnicodeDecodeError, and
AttributeError during response parsing (httpx uses stdlib json, not orjson)
- Add configurable REST_RESPONSE_TEXT_MAX_LENGTH (default: 5000, range: 1000-100000)
to truncate non-JSON response text and limit sensitive data exposure
- Fix query param handling: GET requests merge URL params with input args
(URL params take precedence on conflicts); POST/PUT/PATCH/DELETE preserve
query params in URL for signed URL support (Azure SAS, AWS presigned, etc.)
- Add jq filter validation to detect email addresses mistakenly used as filters
Frontend (admin_ui):
- Fix runToolTest/runToolValidation to use tools/call JSON-RPC method
instead of tool name as method (MCP protocol compliance)
- Add invokeTool() function for "Invoke" button in Tools table
- Port all JS changes to modular admin_ui/ structure (Vite bundled)
Closes#3855Closes#3857
Signed-off-by: Rakhi Dutta <rakhibiswas@yahoo.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* export funcyion in tools.js
Signed-off-by: Rakhi Dutta <rakhibiswas@yahoo.com>
* pre-commit
Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
* resolve rebase conflicts - merge mapping features with signed URL support
Signed-off-by: Rakhi Dutta <rakhibiswas@yahoo.com>
* rebase conflict issue
Signed-off-by: Rakhi Dutta <rakhibiswas@yahoo.com>
* Update .secrets.baseline
Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
---------
Signed-off-by: Rakhi Dutta <rakhibiswas@yahoo.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
Signed-off-by: Brian Hussey <brian.hussey@ie.ibm.com>
Co-authored-by: Gabriel Costa <gabrielcg@proton.me>
Co-authored-by: Brian Hussey <brian.hussey@ie.ibm.com>
0 commit comments