MuleSoft · HTTP Connector
HTTP:FORBIDDEN
Short answer
HTTP:FORBIDDEN means the server refused to return the resource because the client does not have access rights to it (HTTP 403). The credentials were sent, so fix the permissions of the identity behind them on the target system.
VerifiedLast verified
01Error text
Error type: HTTP:FORBIDDEN02Likely causes
- The server refuses to give the requested resource because the client does not have access rights to the content.
- By default, HTTP Connector raises an error for any response with a status code of 400 or above.
03How to fix it
- Identify which identity the request authenticates as, then grant that identity access to the resource on the target system.
- Turn on HTTP wire logging to see the exact request and response: in
log4j2.xml, enable the loggerorg.mule.service.http.impl.service.HttpMessageLoggeratDEBUGlevel. Read the response body, which often says which permission is missing. - Check that the request targets the resource you intended. A wrong path or ID can point at content the identity is not allowed to read.
- Handle the failure with an error handler of type
HTTP:FORBIDDENif the flow should continue when access is refused.
04Official documentation
→Related errors
- HTTP:UNAUTHORIZEDHTTP:UNAUTHORIZED means the server rejected the HTTP Request operation because authentication failed or was not provided (HTTP 401). Send the credentials the server expects, and handle the error type if a rejected call is something the flow should survive.
- HTTP:NOT_FOUNDHTTP: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.
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