Sunagatov / Iced-Latte

a online Marketplace for coffee retail (Backend)
https://iced-latte.uk
MIT License
588 stars 96 forks source link

Fields First Name and Last Name do not accept length > 55 #273

Closed TetianaPerinha closed 2 months ago

TetianaPerinha commented 2 months ago

Description: According to requirements the "First Name" and "Last Name" fields are expected to accept string lengths ranging from 2 to 128 characters. However, attempts to update these fields with strings of length greater than 55 characters result in an internal server error, indicating a discrepancy between the implementation and the specified requirements.

Precondition: User is registered and authenticated.

Steps to Reproduce:

  1. Send an HTTP PUT request to the user update endpoint at http://0.0.0.0:8083/api/v1/users. In the request body, in "First Name" or "Last Name" input a string of 56, 64 characters, or 128 characters, using only Latin letters.
  2. Observe the response.

Expected Result: The fields "Last Name" and "First Name" accept lengths of 56, 64, or 128 characters. The user profile is successfully updated with the new values. HTTP status code 200 is returned, along with a response body containing the updated user information.

Actual Result: The app rejects the request to update "Last Name" and "First Name" fields with lengths greater than 55 characters. The API response is { "message": "Internal server error" }. HTTP status code returned is 500, indicating a server error. image image image image

TetianaPerinha commented 1 month ago

fixed