CDI012 - Request header length is invalid error

Solved! Go to solution
vintuwei
Helper

CDI012 - Request header length is invalid error

I am getting the CDI012 error when making a BIN File Metadata Request https://developer.visa.com/capabilities/visa-bin-attribute-sharing-service/reference#tag/BIN-Files-M....

I am setting the `Content-Type` and `Authorization` headers in the request. Anyone know what this error means?

8 REPLIES 8
jenn_kh
Community Moderator

Re: CDI012 - Request header length is invalid error

Thank you for reaching out, @vintuwei! An agent is looking into this and will get back to you as soon as possible. If any community members know a solution, please feel free to respond in this thread. -Jenn

vintuwei
Helper

Re: CDI012 - Request header length is invalid error

Thank you @jenn_kh
I_Doroteo3
Visa Developer Support Specialist

Re: CDI012 - Request header length is invalid error

Hi @vintuwei

 

Please provide the following information so that we may assist you further: 

  1. Endpoint  
  2. Request Header 
  3. Request Body 
  4. Response Header (include the x-correlation-id) 
  5. Response Body 
  6.  

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header. 

  

Thanks, 

Illana

vintuwei
Helper

Re: CDI012 - Request header length is invalid error

@I_Doroteo3 here are the requested detaills:

 

URL: POST https://sandbox.api.visa.com/filedeliveryservice/v1/binFilesMetadata

 

Request Header: 

{
    "request_ts": "2022-09-19T13:20:21.224",
    "request_message_id": "d7f624cc-933c-49c2-aae2-5d9d24b5f1b5"
}

 

Request Body

{
    "payment_account_type": "P"
}

 

Request Headers

{
  "Server": [
    "nginx"
  ],
  "Date": [
    "Mon, 19 Sep 2022 13:28:42 GMT"
  ],
  "Content-Type": [
    "application/json"
  ],
  "Connection": [
    "keep-alive"
  ],
  "X-SERVED-BY": [
    "-756b6656t"
  ],
  "X-CORRELATION-ID": [
    "1663594122_582_2008103236_-756b6656t_VDP_WS"
  ],
  "X-ERROR-ORIGIN": [
    "9900"
  ],
  "Request_Message_Id": [
    "d7f624cc-933c-49c2-aae2-5d9d24b5f1b5"
  ],
  "Response_Message_Id": [
    "106VDP76805120220919132842684"
  ],
  "Status_Code": [
    "CDI012"
  ],
  "Status_Description": [
    "Request Header Length Invalid."
  ],
  "X-Content-Type-Options": [
    "nosniff"
  ],
  "X-XSS-Protection": [
    "1; mode=block ,0"
  ],
  "Cache-Control": [
    "no-cache, no-store, must-revalidate"
  ],
  "Pragma": [
    "no-cache"
  ],
  "Expires": [
    "0 ,-1"
  ],
  "X-Frame-Options": [
    "DENY ,SAMEORIGIN"
  ],
  "X-Content-Security-Policy": [
    "script-src 'self'"
  ],
  "X-AGS-Request-ID": [
    "v3:8689:sandbox:55c028:655795be9d38881e489dfb39a37d9f3b",
    "v3:8689:sandbox:73c010:c8ad8f718d63374104b923ac7d863790"
  ],
  "X-APP-STATUS": [
    "400"
  ],
  "Strict-Transport-Security": [
    "max-age=31536000;includeSubdomains"
  ],
  "Content-Security-Policy-Report-Only": [
    "default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval'  https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src  https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;"
  ],
  "X-Content-Security-Policy-Report-Only": [
    "default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval'  https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src  https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;"
  ],
  "X-WebKit-CSP-Report-Only": [
    "default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval'  https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src  https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;"
  ],
  "content-length": [
    "283"
  ]
}

 

Response Body

{
  "responseHeader": {
    "responseTS": "2022-09-19T13:28:42.684",
    "responseMessageId": "106VDP76805120220919132842684",
    "requestMessageId": "d7f624cc-933c-49c2-aae2-5d9d24b5f1b5"
  },
  "responseData": null,
  "responseStatus": {
    "statusCode": "CDI012",
    "statusDescription": "Request Header Length Invalid."
  }
}

 

 

 

 

vintuwei
Helper

Re: CDI012 - Request header length is invalid error

@I_Doroteo3 @jenn_kh did you get some time to look at this?

I_Doroteo3
Visa Developer Support Specialist

Re: CDI012 - Request header length is invalid error

Hi @vintuwei

 

I submitted a support ticket and am waiting for a response from the technical team. I'll follow up with them to see if they have an update regarding the error you're seeing and get back to you when I receive a response.

 

Thanks, 

Illana

I_Doroteo3
Visa Developer Support Specialist

Re: CDI012 - Request header length is invalid error

Hi @vintuwei

 

The support team got back to me and said to try shortening the request message ID. 

 

The team shortened the request message ID to "test" and it worked for them in the production environment. When testing with your original request message ID in production, they received the same error as you.

 

Please try this possible solution in sandbox and let me know your results.

 

Thanks, 

Illana

vintuwei
Helper

Re: CDI012 - Request header length is invalid error

I_Doroteo3 this is now working fine. Thank you.