StreetCode icon indicating copy to clipboard operation
StreetCode copied to clipboard

[API][StreetCode/Image/Catalog] When the 'imagesDetails' are deleted from the request body, the catalog on the frontend fails

Open SophiaMRI opened this issue 1 year ago • 2 comments
trafficstars

Environment: All Reproducible: Always Build found: 61192c2

Preconditions Open Postman.

Steps to reproduce

  1. Choose the POST method.
  2. Enter valid data in the mandatory fields from the API documentation in the body (/Streetcode/Create).
  3. Clear the imagesDetails massif. (or:
  • [x] without "alt" string in the "imagesDetails"
  • [x] with "imagesDetails": null
  • [x] without all massif "imagesDetails"
  • [ ] with invalid "imagesIds": [4416] ).
  1. Click the 'Send' button.
  2. Open the StreetCode catalog in the frontend.

Actual result The catalog disappeared in the frontend.

https://github.com/ita-social-projects/StreetCode/assets/135108144/5388f7d4-c454-4dee-a0ee-08a047fa22fc

Expected result The response returns a '400 Bad Request' status, along with the message 'There is no valid "imagesDetails" value'.

Postconditions DELETE the created StreetCode via id.

User story and test case links User story #115

SophiaMRI avatar Feb 05 '24 14:02 SophiaMRI