Skip to content

Deleting a project is breaking client because of empty body in response #39

@mertarmagan

Description

@mertarmagan

Goal

We want to delete some of the projects periodically using this interface with version v1.8.0 .

Problem

We did some tests on the stage server but the DELETE /projects implementation sw360.project.ProjectMixin.delete_project() raises JSONDecodeError each time we try to delete a project although the response is 200 OK and the project is actually deleted.

As we understand the response from server does not contain a body (also tested with Postman) and the response.json() tries to decode as it is written here.

Proposal

Improvement in the if clauses might solve the problem, simply returning True rather than response.json() if response is 200 OK might solve the issue. Similar approach was also followed here in L383.

What are your thoughts on this? Thanks in advance.

/cc @t-graf @gernot-h

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions