Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Resource improvement on bad request #28313

Open
bryanboza opened this issue Apr 22, 2024 · 0 comments
Open

User Resource improvement on bad request #28313

bryanboza opened this issue Apr 22, 2024 · 0 comments

Comments

@bryanboza
Copy link
Member

bryanboza commented Apr 22, 2024

Problem Statement

When sending a bad request to the user resource in dotCMS, the API is returning the same error message twice in the response, leading to redundant error handling and potential confusion for users.

API :http://localhost:8080/api/v1/users

Body:

{
    "active":true,
    "firstName" : "lala",
    "middleName":"MaxtLengtOnName-aBC1dEF2gHI3jKL4mNO5pQR6sTU7vWX8yZA9bCD0eFGhIJkLMnOPqRsTtUVwXYzABCDEFGHIJKLMNOQRSTUVWXYZ123",
    "lastName":"Spanish",
    
    "password":["1","2","3","4","5","6","7","8"]
}

image

Steps to Reproduce

  • Send a bad request to the user resource endpoint in dotCMS. (exclude a required parameter)
  • Observe the response for duplicate error messages.

Acceptance Criteria

  • Single Error Response: Ensure that the API returns a single error message in the response for a bad request to the user resource.
  • Clear Error Message: The error message should clearly indicate the nature of the error and provide guidance on how to resolve it.
  • Consistent Error Handling: The API should handle bad requests consistently across all user resource endpoints.

dotCMS Version

Tested on master // Postman

Proposed Objective

Quality Assurance

Proposed Priority

Priority 4 - Trivial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: New
Development

No branches or pull requests

1 participant