You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

404 Not Found responses are well known to just about every web surfer. It simply means that the target resource of the URI is not found. However, there are different reasons and different sources for the 404 error.

Web Server Generated

One source could be your web server itself (e.g., IIS, Apache, Abyss, etc.). This means the request was never handled by the OECGI, much less your API. You'll know if this is the case rather quickly because of the lack of activity on the API side. For example, no new logs were generated or no message output coming from the command prompt running the OEngineServer. Finally, 404 responses generated from web servers are typically HTML formatted whereas 404 responses generated by the HTTP Framework return a RFC7807 standard problem+json media type response (see further below).

In these cases it is most likely a configuration issue. The web server might not be routing the request to the OECGI properly. Go back through the Server Preparation steps. The URL Rewrite Rules can easily fail with just one minor typo.

API Generated

Generally there are two reasons why the HTTP Framework would return a 404 response. The usual scenario is that the resource hasn't been defined in the Resource Manager yet. In these cases, the API will return this message:

GET https://www.examples.org/parts

{
    "type": "about:blank",
    "title": "Not Found",
    "status": 404,
    "detail": "This is not a valid web API endpoint."
}

However, it is still possible to get a 404 response even if your resource has been defined. This can happen if the URI includes query params that are not defined as a part of the resource.


GET https://www.examples.org/parts


Here are a few reasons and symptoms.

Resource endpoint is not defined in the Resource Manager.




This most likely means you forgot to select at least one HTTP method:

If you are testing from a browser then you must enable the GET method. If you are using an API testing tool, then you can enable any HTTP method appropriate for the API. Either way, whenever an unsupported HTTP method is used, the expected response is 405 Method Not Allowed.


  • No labels