MuleSoft · HTTP Connector

HTTP:NOT_FOUND

Short answer

HTTP:NOT_FOUND means the HTTP Request operation received a 404 response because the server could not find the requested resource. Check the URL shown in the error description, then correct the request or handle the error type in an error handler.

VerifiedLast verified

01Error text

MuleSoft error
HTTP GET on resource 'http://jsonplaceholder.typicode.com:80/mybadrequest' failed: not found (404).

Error type: HTTP:NOT_FOUND

02Likely causes

  • The server could not find a resource at the URL the HTTP Request operation called. The example in the Mule documentation requests a path that does not exist.
  • By default, HTTP Connector raises an error for any response with a status code of 400 or above, so a 404 that you treat as a normal answer still fails the flow.

03How to fix it

  1. Read error.description. It names the HTTP method and the full URL that was called, so you can see which resource was missing.
  2. Correct the host, base path, path or URI parameters on the HTTP Request operation or its configuration so the URL points to a resource that exists.
  3. 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.
  4. If a missing resource is an expected outcome, add an On Error Continue or On Error Propagate handler with the type HTTP:NOT_FOUND.
  5. Or set a response validator on the request so that 404 counts as success, for example <http:success-status-code-validator values="200,404" />.

iNotes

The error text above is the example from the Mule documentation. In your logs the method and URL are your own.

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.