400 Bad request error

System Information
  • Strapi Version: 4.10.2
  • Operating System: Windows 11
  • Database: SQL
  • Node Version: 16.13.0
  • NPM Version: 8,1.0
  • Yarn Version: -

I keep getting 400 Bad request error while trying to access a newly added custom endpoint.
The other one, /bookings/:id/confirm work fine.

Here is the controller implementation and roles permissions.


Actual response;

Am I missing something ?

Don’t you need to actually return something.
400 bad request is normally sent if you are sending it data it does not expect.
Also body would be empty and not RAW when you are making a GET request and not a POST request.

I am sorry but I dont think i understand your explanation.

I have solved it. I had to split those endpoints into 2 separate files.