79570889

Date: 2025-04-12 20:09:04
Score: 4.5
Natty:
Report link

Good morning everyone, hope this message finds you well! Wondering if there's any changes need to be done to the following lines of code as tt's returning the following exceptions(provided in output section). Your support is highly appreciated. Pls advise. Thanks

code.. starts from here....

public interface AuthService {

   @PostMapping(
    value = "/oauth/token",
   consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
   //consumes = {"application/x-www-form-urlencoded"},
    produces = MediaType.APPLICATION_JSON_VALUE
    //produces = {"application/json"}
  )
  LoginResponse authenticate(
    @RequestParam(name = "grant_type") String grantType,
    @RequestParam String username,
    @RequestParam String password,
   @RequestBody String reqBody
 ) ;}

code....code ends here.

Output:

[AuthService#authenticate(String,String,String,String)]: [{"error":"invalid_request","error_description":"Missing form parameter: grant_type"}]] with root cause feign.FeignException$BadRequest: [400 Bad Request] during [POST]

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): appreciated
  • Blacklisted phrase (1): Good morning
  • RegEx Blacklisted phrase (2.5): Pls advise
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user30254997