Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Stream documentation lists exceptions and errors as being returned, not thrown as EventStreamError #4031

Open
SamStephens opened this issue Feb 26, 2024 · 0 comments
Labels
documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.

Comments

@SamStephens
Copy link

SamStephens commented Feb 26, 2024

Describe the issue

The documentation for methods that return event streams, at least the ones I've looked at, include errors as part of the shape of the structure that can be returned. For example from https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker-runtime/client/invoke_endpoint_with_response_stream.html

    'Body': EventStream({
        'PayloadPart': {
            'Bytes': b'bytes'
        },
        'ModelStreamError': {
            'Message': 'string',
            'ErrorCode': 'string'
        },
        'InternalStreamFailure': {
            'Message': 'string'
        }
    }),

However boto3 is smart enough to throw errors as a EventStreamError, via https://github.com/boto/botocore/blob/bf2473756ac0dac340916eaac606b9b767d15e99/botocore/eventstream.py#L354-L362 and https://github.com/boto/botocore/blob/bf2473756ac0dac340916eaac606b9b767d15e99/botocore/eventstream.py#L613-L619.

Links

This is a couple of examples, not an exhaustive list:

@SamStephens SamStephens added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant