OlhenShu / ProjectStage_Team2_May

0 stars 0 forks source link

[Eco-News, GET/econews/isLikedByUser] The 500 (Internal Server Error) response code is returned instead of 401 (Unauthorized #310

Closed OlhenShu closed 1 month ago

OlhenShu commented 1 month 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 GET/econews/isLikedByUser.
  3. Set the existed post id as the value of "id" query parameter.
  4. Pay attention to the response code.

Actual result: The 500 (Internal Server Error) response code is returned. Expected result: The 401 (Unauthorized) response code is returned.