Create Source returns status code 201 instead of 200

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start with api_client.py line 229 to trace how the response status is mapped, then inspect sources_api.py around line 348 and reproduce Create Source returning 201. Update the underlying API documentation or generated source so status 201 resolves to the CreateSource response instead of None, and verify the SDK preserves the response.

Written by the indexing model from the issue text.

Description

I am running on the latest package version, in the api_client.py, line 229, the code is looking up a type mapping based on a status code. As it can not resolve it, it falls back to None, overwriting the actual response. A hotfix is to change line 348 in sources_api.py to: '201': "CreateSource..."

As the code is auto-generated, I assume that the underlying API documentation needs to be updated. I have attached screenshots for reference.

Bildschirmfoto 2024-02-01 um 08 54 29 Bildschirmfoto 2024-02-01 um 08 56 26 Bildschirmfoto 2024-02-01 um 08 56 17 Bildschirmfoto 2024-02-01 um 09 11 55
Dominant language
Python
Stars
2
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from segmentio/public-api-sdk-python

All issues in segmentio/public-api-sdk-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.