MuleSoft · APIkit for REST
APIKIT:NOT_FOUND
APIKIT:NOT_FOUND is the APIkit for REST error type that maps to HTTP status 404 with the response message "Resource not found". APIkit validates incoming requests against your RAML or OAS API specification, so compare the failing request with the specification.
Needs verificationLast reviewed
01Error text
Error type: APIKIT:NOT_FOUND
HTTP status: 404
Response message: Resource not found02Likely causes
- Unconfirmed: the request path does not match a resource defined in the API specification.
- APIkit for REST automatically validates incoming requests against the API contract defined in RAML or OAS.
03How to fix it
- Check the request path against the resources defined in the API specification, including the base path of the HTTP Listener.
- Compare the failing request with the API specification the APIkit router uses, and correct whichever of the two is wrong.
- To control what the caller receives, add an On Error Propagate handler with the type
APIKIT:NOT_FOUNDthat sets the response body and anhttpStatusvariable of 404. The APIkit scaffolder can generate this baseline handler. - Adapt the handler if your API needs a custom status code or message.
iNotes
The APIkit router has attributes that change what it validates: queryParamsStrictValidation (validates that request query parameters are defined in the RAML file), headerStrictValidation (validates that request headers are defined in the RAML file or belong to a well-known set of headers) and disableValidations (disables validations of requests).
04Official documentation
→Related errors
- 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.
- APIKIT:METHOD_NOT_ALLOWEDAPIKIT:METHOD_NOT_ALLOWED is the APIkit for REST error type that maps to HTTP status 405 with the response message "Method not allowed". APIkit validates incoming requests against your RAML or OAS API specification, so compare the failing request with the specification.
- APIKIT:BAD_REQUESTAPIKIT:BAD_REQUEST is the APIkit for REST error type that maps to HTTP status 400 with the response message "Bad request". APIkit validates incoming requests against your RAML or OAS API specification, so compare the failing request with the specification.
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