[Koha-bugs] [Bug 36066] REST API: We should only allow deleting cancelled order lines

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 5 12:08:34 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36066

--- Comment #11 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Victor Grousset/tuxayo from comment #10)
> Another thing that made it slip unnoticed is the return code being the same
> for not having the right permission and trying to delete something not in
> the right state for deletion.

Good catch!

> This is totally out of this ticket: Isn't there any code to differential
> these two things? I'm just asking to know if I should open a ticket or if
> there is really nothing to do about this and just move on.

We use 409 (Conflict) for such cases:

"Indicates that the request could not be processed because of conflict in the
current state of the resource, such as an edit conflict between multiple
simultaneous updates."

Try

```
cd api/v1/swagger/paths
git grep 409
```

Best regards

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list