You may receive HTTP Response 400 Bad request while making SAP OData request.
Sample Log)
2025-06-13T01:57:06.429Z DEBUG [q6cb9] SAP_Request event:f5151860-47f7-11f0-a156-567dfb88e816 [MuleRuntime].uber.07: [test-ei-test-app].test-Flow.CPU_LITE @3ca38e3d - REQUESTER
POST /sap/opu/odata/sap/TEST_SAP_TEST/Example
accept: application/json
x-csrf-token: g9n...
x-requested-with: X
x-anypnt-app-worker: 449CD...
x-correlation-id: f5151860-47f7-11f0-a156-567dfb88e816
Cookie: MYSAPSSO2=AjQxMDIBABgAQw... sap-usercontext=sap-client=700; SAP_SESSIONID_GWQ_700=pUK...
Host: sapxxx.xxx.com:8443
User-Agent: AHC/1.0
Connection: keep-alive
Authorization: Basic Q09S...
Content-Type: application/json
Content-Length: 130516439 <===
{
"d": {
"ProblemCategory": "OCW",
"ADHOC_UPD_INP": {
...
"Filename": "Photo 1.jpg",
"Zzesribase64pdf": "/9j/4AAQSkZJRgABAQAASABIAAD/4QrURXhpZgAATU0AKgA..................... <===
...
...
2025-06-13T01:57:06.544Z ERROR [q6cb9] DefaultExceptionListener event:f5151860-47f7-11f0-a156-567dfb88e816 [MuleRuntime].uber.07: [test-ei-test-app].test-Flow.CPU_LITE @3ca38e3d -
********************************************************************************
Message : HTTP POST on resource 'https://sapxxx.xxx.com:8443/sap/opu/odata/sap/TEST_SAP_TEST/Example' failed: bad request (400).
Element : test-Flow/processors/5/processors/0/processors/2 @ test-ei-test-app:test-sapi.xml:785 (Request)
Element DSL : <http:request method="POST" doc:name="Request" doc:id="3fe8ffca-4907-4056-ab21-821a4e905133" config-ref="SAP_Request" path="${SAP.completeNotifPath}" responseTimeout="${SAP.timeout}">
...So this should be caused by the size limitation(request size shoud be less than 100 MB).
Please make sure to check the latest SAP Documentation, the limitation can be changed depending on situation, version, etc.
Also, 400 Bad Request can be caused by other reason. Remember to enable HTTP WireLoggingh(*1) and possible compare a successful(and similar) request and failing request to try to find the reason.
*1 KB: How to Enable HTTP Wire Logging for HTTP Connector or Other Connectors Using HTTP Service
005036932

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.