Erroneous Start Channel Commercial response #7
Labels
no action
No action is required
product: v5
API endpoints in the "v5" namespace
ticketed
Has been given an internal tracking ticket
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.
The text was updated successfully, but these errors were encountered: