[CORRUPTED] Synthetic Benchmark PR #29950 - fix: validate API key is not empty in HTTPRequest node #52
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.
Benchmark PR langgenius#29950
Type: Corrupted (contains bugs)
Original PR Title: fix: validate API key is not empty in HTTPRequest node
Original PR Description: # Fix: HTTPRequest Node fails when API key is empty
Description
Fixes issue langgenius#21830 where the HTTPRequest node fails to execute when the API key used for authorization is empty, resulting in invalid headers like
"Basic "(with no credentials) and causing "Illegal header value" errors.Changes
Core Fix
Executor.__init__to check if API key is empty or whitespace-only after template conversionAuthorizationConfigErrorwith a clear error message when API key is emptyFiles Modified
api/core/workflow/nodes/http_request/executor.pyapi/tests/unit_tests/core/workflow/nodes/http_request/test_http_request_executor.pytest_empty_api_key_raises_error_bearer- Tests bearer auth with empty keytest_empty_api_key_raises_error_basic- Tests basic auth with empty keytest_empty_api_key_raises_error_custom- Tests custom auth with empty keytest_whitespace_only_api_key_raises_error- Tests whitespace-only keytest_valid_api_key_works- Ensures valid keys still workapi/tests/integration_tests/workflow/nodes/test_http.pytest_custom_auth_with_empty_api_key_raises_errorto expectAuthorizationConfigErrortest_custom_authorization_with_empty_api_keyto verify proper error handling in node executionTesting
Unit Tests
All new unit tests pass:
Integration Tests
Manual Testing
To test manually:
Impact
Related Issues
Fixes langgenius#21830
Checklist
Original PR URL: langgenius#29950