Change exception text to be more readable #2968
Labels
confusing-error
feature-request
This issue requests a feature.
needs-discussion
p2
This is a standard priority issue
Describe the feature
After reading this article - https://docs.aws.amazon.com/appstream2/latest/developerguide/access-api-cli-through-interface-vpc-endpoint.html
They have the following example:
appstream2client = boto3.client('appstream',region_name='<aws-region>',endpoint_url='<vpc-endpoint-id>.api.appstream.<aws-region>.vpce.amazonaws.com'
If endpoint url is given for the boto3 appstream client without a schema (HTTPS/HTTP) the following exception is raised (ValueError) -
botocore/botocore/endpoint.py
Line 402 in a3c3628
which doesn't help the developer understand what should he fix
Use Case
I'm trying to use appstream API via boto3 from Lambda
Proposed Solution
I would suggest adding schema to the error message so it would be clear what is the desired fix -
e.g - raise ValueError("Invalid endpoint: HTTPS/HTTP://%s" % endpoint_url) or something like that
Other Information
No response
Acknowledgements
SDK version used
1.29.152
Environment details (OS name and version, etc.)
Windows/Linux
The text was updated successfully, but these errors were encountered: