Error handling

If the API call fails, an HTTP code will be returned, e.g. "HTTP 401 Unauthorized" along with a body with error details.

Relevant error codes are listed on the page Error codes and messages and also in the API integration guide.

 

Who are the errors meant for?

Not all errors can be addressed by the end-user. Nevertheless, as the end-user will be dealing with alert information it’s critical that the end-user is informed whenever an error has occured and how to react on the error (e.g. try operation again, renew login, etc.)

Example of an error response:

{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "processing", "diagnostics": "KJF-000123" }, { "severity": "error", "code": "processing", "diagnostics": "Signatur på JWT fra helseid ikke gyldig, signert med ukjent sertifkat eller JWT er malformed." } ] }

 

 

© Norsk helsenett - kjernejournal