core icon indicating copy to clipboard operation
core copied to clipboard

Bundle resource needs some improvements

Open bryanboza opened this issue 11 months ago • 2 comments

Parent Issue

Related to #26201

Problem Statement

When you are deleting a bundle, we always are returning a 200 in the response with the follow message "entity": "Removing bundles in a separated process, the result of the operation will be notified". Then does not matter if the bundle was deleted or not.

At the response level, we are unable to know if we delete the bundle or not. We need to return a 404 error and the corresponding message in case the bundle does not exist.

Also, if you don't send body in that request, we are returning a 500 exception with a NPE in the log, we need to catch this exceptions and return the 400 (bad request) errror indicating the problem. Here the log: https://gist.github.com/bryanboza/21b5a4cf30950ebdee530b6117d38fbb image

Steps to Reproduce

  • Try to delete bundles following each case mentioned above

Acceptance Criteria

  • Need to fix the exceptions
  • Need to add postman test to each case

dotCMS Version

Tested on master // Docker // FF

Proposed Objective

Quality Assurance

Proposed Priority

Priority 2 - Important

bryanboza avatar Mar 01 '24 00:03 bryanboza