PDS FHIR API - Internal errors returning 404 response codes

Over the past 48 hours we’ve started to see internal faults when making requests to PDS FHIR API on INT. For example:

{
  "status": 404,
  "response": {
    "req": {
      "method": "GET",
      "url": "https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9000000010",
      "headers": {
        "x-request-id": "733204f4-4dc1-463b-979e-8daefecd9b05",
        "nhsd-end-user-organisation-ods": "---",
        "authorization": "---"
      }
    },
    "header": {
      "date": "Fri, 17 Nov 2023 14:59:45 GMT",
      "content-type": "application/json",
      "content-length": "207",
      "connection": "close",
      "content-security-policy": "frame-ancestors 'none'",
      "x-frame-options": "DENY",
      "x-xss-protection": "1",
      "x-content-type-options": "nosniff",
      "strict-transport-security": "max-age=86400"
    },
    "status": 404,
    "text": "{\"fault\":{\"faultstring\":\"Unable to identify proxy for host: secure and url: \\/personal-demographics\\/FHIR\\/R4\\/Patient\\/9000000010\",\"detail\":{\"errorcode\":\"messaging.adaptors.http.flow.ApplicationNotFound\"}}}"
  }
}

The server response code (404) indicates that the requested resource was not found. This is misleading as the resource could be present (i.e. PDS holds a record for this NHS Number) but has not been provided because of an internal error, I assume in Apigee.

Hey,

I’ve been keeping an eye on this thread. Have you managed to resolve the 404 responses in relation to the unidentifiable host proxy?

In a nutshell, please lookup the proxy endpoint configuration settings for the API’s proxy. Ensure it’s configured to accept requests for the VHost which is specified in the error (details shown below on how to locate errors.)

With use of “secure and url”, I’m sure defining “secure” as a VirtualHost directive will resolve. A shot in the dark here, but it may be already defined as “default”.

On a further technical level, I’d recommend taking a look at the Message Processor logs which is a good starting point. If you are using a private cloud on Apigee then you can fetch the logs using the below command within your OS terminal (I’m guessing NGINX so vim, nano etc should be fine):

/opt/apigee/var/log/edge-router/nginx/ORG~ENV.PORT#_access_log

From the error code you are receiving (http.flow.ApplicationNotFound), you can lookup the following entries within this log:

Upstream_status, status [404]
X-Apigee-fault-code [messaging.adaptors.http.flow.ApplicationNotFound]

Once you’ve located the messages, take the associated message ID’s and use those to further analyse the Message Processor logs (/opt/apigee/var/log/edge-message-processor/logs/system.log) and check messaging.adaptors.http.flow.ApplicationNotFound in relation to the API being used.

Please let me know if you require further assistance. Just bare in mind it appears to be a VHost issue so should be easily resolved on this basis.

Kind Regards

Damon McPate

Thanks for the response.

I’m a consumer of the API so can’t resolve it. I’ve reported it because it gives rise to misleading behaviour that will have clinical safety implications for our customers.

I hope that one of the NHS team will be able to provide some insight!

Hey, I’m a developer part of the APIM team. This is an issue on Apigee’s end and have raised a ticket with them to resolve this. So for the mean time, please bare with us.

We’re also receiving this error sporadically, can I confirm this is an error on the PDS API’s end?

Yes, it is a problem with the PDS API.

1 Like