OlhenShu / GreenCityProjectStage

0 stars 0 forks source link

[Eco-News, POST/econews] The response code 400 (Bad request) is not documented in the response codes list #263

Open OlhenShu opened 11 months ago

OlhenShu commented 11 months ago

Environment: Windows 11 Home Chrome 114.0.5735.91 (Official buid) (64-bit) GreenCityDocker-3 is built and running.

Reproducible: always.

Pre-conditions: User is not logged in.

Steps to reproduce

  1. Select the “Eco-news" controller.
  2. Select the method POST/econews.
  3. Add the request with the "formData"(addEcoNewsDtoRequest: {"tags":["Новини"],"text":"Тест","title":"Test ","source":"string"}).
  4. Send the request.
  5. Compare the returned response code with the list of documented response codes.

Actual result: The 400 (Bad request) response code is not documented in the response codes list.

Expected result: The 400 (Bad request) response code is documented in the response codes list.

urio999 commented 11 months ago

After documenting the code 401 (Unauthorized) response for this controller according issue #262 we can't no longer add any requests if the user is unauthorized. Nevertheless, the 400 (Bad request) response code is documented in the response codes list and works for authorized users.