Invalid request header

This problem occurs when the request contains an invalid or malformed header, causing the server to reject it

Description

Your client application issued a request to an API, but the request contained an invalid or malformed header, resulting in an invalid request header error.

Example

{
  "type": "https://dev.euipo.europa.eu/problems-registry/invalid-request-header",
  "title": "Invalid request header",
  "detail": "The request contained invalid, or malformed header",
  "status": 400,
  "instance": "/messages",
  "code": "invalid-request-header",
  "errors": [
    {
      "detail": "The value specified for the header 'Accept-language' is not valid. Please use one of the valid values: [bg, cs, da, de, el, en, es, et, fi, fr, hr, hu, it, lt, lv, mt, nl, pl, pt, ro, sk, sl, sv]",
      "header": "Accept-language"
    }
  ],
  "correlationId": "b1691dd94ef7a729cf33cf09561b0e0f"
}

Troubleshooting Steps

  • Review the API documentation:* Ensure that all headers in your request match the expected format and values defined by the API.
  • Validate the headers: Check that all headers are correctly formatted and contain valid values.
  • Check for typos: Ensure there are no typos in the header names or values.

Error Details

The errors property in the response provides detailed information about specific issues with the headers. Each object in the errors array includes:

  • detail: A description of the specific error.
  • header: The name of the header that caused the error.