MuleSoft · HTTP Connector

HTTP:NOT_ACCEPTABLE

Short answer

HTTP:NOT_ACCEPTABLE means the server cannot produce a response that matches the content negotiation headers of the request (HTTP 406). Correct the Accept headers the HTTP Request operation sends.

VerifiedLast verified

01Error text

MuleSoft error
Error type: HTTP:NOT_ACCEPTABLE

02Likely causes

  • The server cannot produce a response matching the list of acceptable values defined in the request's content negotiation headers.
  • By default, HTTP Connector raises an error for any response with a status code of 400 or above.

03How to fix it

  1. Turn on HTTP wire logging to see the exact request and response: in log4j2.xml, enable the logger org.mule.service.http.impl.service.HttpMessageLogger at DEBUG level. Look at the Accept headers in the outgoing request.
  2. Set the Accept header on the HTTP Request operation to a media type the server can return.
  3. Handle the failure with an error handler of type HTTP:NOT_ACCEPTABLE.

04Official documentation

Test every fix in a non-production environment before you apply it to production. See how entries are verified.

More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer

The iPaaS Brief

Subscribe to The iPaaS Brief.

The iPaaS newsletter for the people who run integrations. From iPaaS Group.

Free. You finish on theipaasbrief.com and confirm by email.