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

Closed
SamStephens opened this issue Feb 26, 2024 · 2 comments
Assignees
Labels
documentation This is a problem with documentation.

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
@tim-finnigan tim-finnigan self-assigned this May 14, 2024
@tim-finnigan tim-finnigan removed the needs-triage This issue or PR still needs to be triaged. label May 14, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reaching out — after discussion with the team we decided that this should be consolidated with the other issue you opened (boto/botocore#3126) for further review and discussion.

@tim-finnigan tim-finnigan closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

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.
Projects
None yet
Development

No branches or pull requests

2 participants