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

[Bug] Endpoint returns different response than twitch docs #292

Closed
aaricdev opened this issue Nov 19, 2023 · 0 comments · Fixed by #294
Closed

[Bug] Endpoint returns different response than twitch docs #292

aaricdev opened this issue Nov 19, 2023 · 0 comments · Fixed by #294

Comments

@aaricdev
Copy link
Contributor

aaricdev commented Nov 19, 2023

What is the problem?

When using the endpoint to receive all blocked users for a user /mock/users/blocks on a newly generated mock-api, the response looks like

{
    "data": null
}

According to the official docs, the response should be an empty array and after testing it, the response looks more like

{
    "data": [],
    "pagination": {}
}

This is just a minor thing, but in my case, I use the mock-api in automated tests to get more or less realistic results without touching the real Helix API. And because I expect an array there, my tests fail. Also, the pagination is missing, even though its empty.

Operating System

Ubuntu 22.04

Architecture Version (x86, x64, arm, etc)

x64

Steps to reproduce

  1. Start the mock-api twitch mock-api start
  2. Generate a user access token (https://github.com/twitchdev/twitch-cli/blob/main/docs/mock-api.md#auth-namespace)
  3. Send request to http://localhost:8080/mock/users/blocks?broadcaster_id={YOUR_MOCK_ID}

Relevant log output

No response

Dkamps18 added a commit to Dkamps18/Twitch-CLI that referenced this issue Nov 28, 2023
@Dkamps18 Dkamps18 mentioned this issue Nov 28, 2023
4 tasks
Xemdo added a commit that referenced this issue Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant