StreetCode
StreetCode copied to clipboard
[API][StreetCode/Image/Catalog] When the 'imagesDetails' are deleted from the request body, the catalog on the frontend fails
trafficstars
Environment: All Reproducible: Always Build found: 61192c2
Preconditions Open Postman.
Steps to reproduce
- Choose the POST method.
- Enter valid data in the mandatory fields from the API documentation in the body (/Streetcode/Create).
- 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] ).
- Click the 'Send' button.
- 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