Virhevastauksia

Vastaussanoman HTTP header-osan esimerkki on kuvattu sivulla Haun vastaus.

Ei vaadittavaa auktorisoinnin luvitusta haettuun resurssiin

Vastauksessa tulee header-osiossa virhestatuskoodi 401 ja body-osuudessa on OperationOutcome-resurssi.

{
	"resourceType": "OperationOutcome",
	"issue": [
		{
			"severity": "error",
			"code": "processing",
			"details": {
				"coding": [
					{
						"system": "urn:oid:1.2.246.537.5.40112.2006",
						"code": "5Y00009",
						"display": "Käyttöoikeusvirhe."
					}
				]
			},
			"diagnostics": "Käyttöoikeusvirhe."
		}
	]
}

Kielletty hakuparametri-yhdistelmä: period + effective-time

Vastauksessa tulee header-osiossa virhestatuskoodi 400 ja body-osuudessa on OperationOutcome-resurssi.

{
	"resourceType": "OperationOutcome",
	"issue": [
		{
			"severity": "error",
			"code": "processing",
			"details": {
				"coding": [
					{
						"system": "urn:oid:1.2.246.537.5.40112.2006",
						"code": "4Y00007",
						"display": "Virhe sanoman eheydessä."
					}
				]
			},
			"diagnostics": "Virheellinen parametri [period + effective-time yhdistelmä]"
		}
	]
}

Potilaan hetu on tyhjä

Vastauksessa tulee header-osiossa virhestatuskoodi 400 ja body-osuudessa on OperationOutcome-resurssi.

{
	"resourceType": "OperationOutcome",
	"issue": [
		{
			"severity": "error",
			"code": "processing",
			"details": {
				"coding": [
					{
						"system": "urn:oid:1.2.246.537.5.40112.2006",
						"code": "4Y00007",
						"display": "Virhe sanoman eheydessä."
					}
				]
			},
			"diagnostics": "Virheellinen parametri [patient:identifier -system]"
		}
	]
}

Virheellinen token

Vastauksessa ei palaudu HTTP body-osaa.

Status code: 401
x-request-id: 1.2.246.10.1.20241012103951.93.2023.11039512024343068778
content-type: application/fhir+json;charset=utf-8
transfer-encoding: chunked
date: Tue, 10 Dec 2024 08:39:51 GMT

Epävalidi sanoma

Vastauksessa ei palaudu HTTP body-osaa.

Status code: 400
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Cache-Control: no-cache
Connection: close
Content-Type: text/html; charset=utf-8
Pragma: no-cache
X-Kanta-Support-ID: 1526554969055921333
Content-Length: 0