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

Erroneous Start Channel Commercial response #7

Closed
thedist opened this issue Dec 7, 2019 · 1 comment
Closed

Erroneous Start Channel Commercial response #7

thedist opened this issue Dec 7, 2019 · 1 comment
Labels
no action No action is required product: v5 API endpoints in the "v5" namespace ticketed Has been given an internal tracking ticket

Comments

@thedist
Copy link

thedist commented Dec 7, 2019

Brief description
The Star Channel Commercial returns incorrect error responses, as well as sending a 'success' response in a situation it should fail.

How to reproduce
Use the https://dev.twitch.tv/docs/v5/reference/channels#start-channel-commercial endpoint.
If the channel is offline a 500 error is returned.
If the channel is live and hasn't run an ad recently, a 'success' message is returned { Message: 'Starting commercial break. Keep in mind you are still live and not all viewers will receive a commercial.', Length: 30, RetryAfter: 480 } which is correct for Affiliates/Partners, but a normal user should not be receiving this as no ads can actually be run.
If the channel is live and has run an ad recently (within the 'retry after' window) a 500 error is returned.

Expected behavior
The documentation specifically states that running an ad too quickly, as well as attempting to run for a non partner/affiliate, there should be a 422 Unprocessable Entity,
There's no documented behaviour for an offline stream, but it should respond with either a 422, or follow the behaviour of other endpoints which require a stream to be live such as the Create Channel Marker endpoint and return a 404.

None of these errors should be 500's.

Additional context or questions
No equivalent Helix endpoint exists for this, so while this is a deprecated endpoint it is something we need to rely on so correct responses is important.

@thedist thedist added the product: v5 API endpoints in the "v5" namespace label Dec 7, 2019
@jbulava
Copy link
Member

jbulava commented Feb 12, 2020

Ticketed internally on GQL-912.

@jbulava jbulava added the ticketed Has been given an internal tracking ticket label Feb 12, 2020
@thedist thedist closed this as completed Apr 13, 2023
@jbulava jbulava added the no action No action is required label Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no action No action is required product: v5 API endpoints in the "v5" namespace ticketed Has been given an internal tracking ticket
Projects
None yet
Development

No branches or pull requests

2 participants