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

Given Auth user POST /create , /login, when field are empty, enhance message field on response #127

Open
plopezgit opened this issue Feb 8, 2024 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@plopezgit
Copy link
Owner

Instead of inject the whole response error message capture only arguments!!,

{"responseCode":400,

"message":"Validation failed for argument [0] in public org.springframework.http.ResponseEntity<com.plopez.diceroller.microservice.authservice.model.entity.AuthUser> com.plopez.diceroller.microservice.authservice.controller.AuthUserController.create(com.plopez.diceroller.microservice.authservice.model.dto.AuthUserDTO): [Field error in object 'authUserDTO' on field 'password': rejected value [null]; codes [NotBlank.authUserDTO.password,NotBlank.password,NotBlank.java.lang.String,NotBlank]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [authUserDTO.password,password]; arguments []; default message [password]]; default message [Password must not be null.]] "

,"messageDescription":"uri=/auth/create","responseTimeStamp":"2024-02-07T19:36:03.938+00:00"}

Expected:

arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [authUserDTO.password,password]; arguments []; default message [password]]; default message [Password must not be null.]] "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Development

No branches or pull requests

1 participant