fix: add validation for empty ias client id - #283
Merged
Conversation
NicoleMGomes
force-pushed
the
fix/client-id-agw
branch
from
August 24, 2026 15:26
6f492a6 to
56fde3d
Compare
NicoleMGomes
force-pushed
the
fix/client-id-agw
branch
from
August 24, 2026 15:28
56fde3d to
791d740
Compare
cassiofariasmachado
approved these changes
Aug 24, 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.
Description
AgentGatewayClient.get_ias_client_id()previously returned an empty string silently when the IASclientIdwas missing from the destination properties (LoB flow) or whenclient_idwas empty in the customer credentials file. Callers had no way to distinguish a valid empty-string result from a misconfiguration, and would typically fail later with an opaque error.This fix adds explicit validation at both resolution paths:
get_ias_client_id_lobin_lob.py): raisesAgentGatewaySDKErrorif theclientIdproperty is absent or empty on the IAS destination.AgentGatewayClient.get_ias_client_idinagw_client.py): raisesAgentGatewaySDKErrorifcredentials.client_idis empty after loading the credentials file.Tests are updated to assert the new error behaviour, and a new test case covers the empty customer
client_idscenario.Related Issue
Closes #
Type of Change
How to Test
test_raises_when_client_id_property_absent(LoB flow — missingclientIddestination property)test_customer_raises_when_client_id_empty(Customer flow — emptyclient_idin credentials)clientId/client_idis present, the value is returned unchanged.Checklist
Additional Notes
This is a purely additive validation change. The happy path (non-empty
client_id) is unaffected. Any caller that was previously handling an empty string return now needs to handleAgentGatewaySDKErrorinstead — but in practice no legitimate call site would treat an empty client ID as a success.