Hello and welcome to the forum 🙂
Bad request is a standard code, provided by the server if the client request is judged to be invalid. r3 does nothing special, it just sends the REST call as defined.
To find the issue, you could print out the parts of the request that the REST call is doing in the backend (like the request headers and body) and copy past them into any REST dev utility (like Postman).
Executing calls from the frontend might set different headers, or maybe the request body is formed differently.