Open TetianaPerinha opened 2 months ago
Hi @TetianaPerinha I would like to take up this issue. Could you assign it to me
Hi @TetianaPerinha I would like to take up this issue. Could you assign it to me
Hey @DarsiSreelekha, I've assigned this task to you. If you have any questions, feel free to ask.
Hi @TetianaPerinha @Sunagatov
Hi @TetianaPerinha @Sunagatov
- To customize the error response for the update users api, the ideal approach I think would be adding custom error messages for fields in UpdateUserAccountRequest. Eg: @NotNull(message="First name is the mandatory attribute") for firstname and add an exception handler.
- But the class is a generated one from com.zufar.icedlatte.openapi.dto which is a mentioned dependency in pom.xml.
- Could you help me in modifying it if it's okay for you or else I will try another alternative approach if possible.
@Sunagatov Could you help, please?
Hi @TetianaPerinha @Sunagatov
- To customize the error response for the update users api, the ideal approach I think would be adding custom error messages for fields in UpdateUserAccountRequest. Eg: @NotNull(message="First name is the mandatory attribute") for firstname and add an exception handler.
- But the class is a generated one from com.zufar.icedlatte.openapi.dto which is a mentioned dependency in pom.xml.
- Could you help me in modifying it if it's okay for you or else I will try another alternative approach if possible.
@Sunagatov Could you help, please?
Hi @TetianaPerinha @Sunagatov
- To customize the error response for the update users api, the ideal approach I think would be adding custom error messages for fields in UpdateUserAccountRequest. Eg: @NotNull(message="First name is the mandatory attribute") for firstname and add an exception handler.
- But the class is a generated one from com.zufar.icedlatte.openapi.dto which is a mentioned dependency in pom.xml.
- Could you help me in modifying it if it's okay for you or else I will try another alternative approach if possible.
I understood that the dto class UpdateUserAccountRequest is generated from openapi spec. So, have made necessary changes in the same and raised PR. Please review it. https://github.com/Sunagatov/Iced-Latte/pull/317
Description: When sending a request to update user's info with an empty body, the app return a clear error message in string format.
Precondition: The user authorized and gets Bearer token
Steps to Reproduce: replace token with valid data Send a PUT request to the endpoint http://localhost:8083/api/v1/users using the HTTP PUT method with an empty JSON object {} as the body. curl --location --request PUT 'http://0.0.0.0:8083/api/v1/users' --header 'Content-Type: application/json' --header 'Authorization: Bearer {token}'{ }'
Expected result: format message should be a string. "First name is the mandatory attribute" and "Last name is the mandatory attribute"
Actual result: format message is list dictionary.