ita-social-projects / GreenCity

The main aim of “GreenCity” project is to teach people in a playful and challenging way to have an eco-friendly lifestyle. A user can view on the map places that have some eco-initiatives or suggest discounts for being environmentally aware (for instance, coffee shops that give a discount if a customer comes with their own cup). А user can start doing an environment-friendly habit and track their progress with a habit tracker.
MIT License
65 stars 80 forks source link

[API user-controller] [PATCH/user/profilePicture] The status code "500Internal Server Error" is shown after sending the request with invalid link #6743

Open Viktoriia0106 opened 10 months ago

Viktoriia0106 commented 10 months ago

Environment: Windows 10, Postman Reproducible: always Build found: 06.12.2023

Preconditions The user is logged in, and the token is gotten.

Steps to reproduce

  1. Send the request PATCH greencity-user.greencity.social/user/profilePicture.
  2. Body: use "base64", "text" format, and any invalid link (e.g. https://www.greencity.social/#/greenCity)
  3. Pay attention to the status code.

Actual result The status code is 500Internal Server Error.

Expected result The status code is 400 (Bad request) and the error message "Invalid Base64 Format" is shown after sending the request with an invalid link.

User story and test case links E.g.: "User story #1303 invalid_link_base64

Labels to be added "Bug", Priority ("pri: Medium"), Severity ("severity: Minor"), "API" (for back-end bugs).

KizerovDmitriy commented 4 months ago

Already fixed image

snezhanapravdyuk commented 3 months ago

изображение