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

Developer Experience: Fetch and update of Project causes bad request #68

Open
Kingdutch opened this issue Jan 28, 2022 · 0 comments
Open

Comments

@Kingdutch
Copy link
Contributor

Problem

The below is a hickup in developer experience of the SDK. After writing it I realised that update is performing a PATCH and thus does not require all the data to be passed, but only the data that you actually wish to change.

I'm submitting this anyway because it's non-obvious when using just the SDK without actively looking at the docs and it may help someone else who was similarly puzzled.

Original Issue

The default_domain is a property of Project. Thus using the SDK I would expect to be able to update this property by:

  1. Fetching the project
  2. Getting the data for the project
  3. Adjusting the project
  4. Updating the project

However, in the current implementation this does not cause an error in the SDK. However it does cause a BadResponseException with a 400 Bad Request error from the server.

The API docs show that fetching provides a lot more info than is needed in updating which is probably the problem.

The checkProperty function could be used to flag this for a developer but it's currently not implemented for Project.

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

No branches or pull requests

1 participant