Skip to content

API Error Codes

Dheeraj Pundir edited this page Nov 4, 2020 · 11 revisions

This page documents the error codes that are used in the reference system.

  • All codes are 4 digit codes.
    • CM ranges - 1xxx
    • Gateway ranges - 2xxx
    • HIP Bridge/Health-Repository - 3xxx
    • HIU Bridge/Health-Repository - 4xxx
  • 1st Digit denotes the System
  • 2nd Digit denotes the type of errors (e.g. x4xx - typically for client errors, x5xx - for internal errors)
  • Some error codes are intentionally kept similar to bring synergy with HTTP Status codes (e.g x401, x500)
  • Some error codes are also maintained so as to keep same numbers in the other systems for similar error

Gateway Error Codes

CodeDescriptionExplanation
2401Invalid Token
2429Too many attemptsUsually in case of replay attacks, where the same requestId+timestamp have been repeated
2500Unknown ErrorServer side error that was unexpected
2503Service downOne or more internal service is down
2504External resource unavailableDatabase or other network resource is not available
2505Invalid Bridge Registry Request
2506Invalid Bridge Service Request
2507Invalid CM Service Request
2508Invalid CM Registration Entry

CM Error Codes

CodeDescriptionExplanation
1401Token is invalid or expiredToken is invalid or expired
1402Care Context Not Found
1403Incorrect Refresh Token
1404No patient Found
1405Invalid OTP
1406OTP Expired
1407OTP request limit exceeded
1408Invalid OTP attempts exceeded
1409Duplicate discovery request
1410Consent Artefact Expired
1411Invalid State
1412Request Already Exists
1413Invalid Link Reference
1414User not found
1415Consent Request not found
1416Consent Artefact not found
1417Invalid Requester
1418Invalid Date Range
1419Invalid HI Type
1420Invalid Purpose of Use
1421Invalid Provider or Care-Context
1422Can not process response from Gateway
1423User temporarily blocked
1424Transaction PIN is already created
1425Invalid Transaction PIN
1427Transaction ID not found
1428Consent not granted
1429PIN Attempts exceeded
1430Invalid Session
1431Invalid Scope
1432Invalid Recovery Request
1433Username or password incorrect
1434User already exists
1435Consent Request expired
1436Invalid Auth Method
1437Account not found
1438Invalid Discovery
1500Unknown error occurred
1501Queue not found
1502Database operation failed
1503Unable to connect to provider registry
1504No result from Gateway
1505Provider not found
1506Invalid callback resp id
1507Failed to get linked care contexts
1508Consent Artefact forbidden
1509Transaction PIN does not exist
1510Bad request from Gateway
1511Network Service Error
1503Service is down
1512Discovery request not found
1513Invalid Request
1514Unable to fetch last resource date
1439Care context already linked

HIP Bridge/Health-Repository Error Codes

CodeDescriptionExplanation
3401Invalid Token for link ConfirmationToken is invalid or expired
3402Care Context Not found
3403Multiple patients found
3404No Patients Found
3405Invalid OTP
3406OTP Expired
3407Discovery Request Not Found
3408Link Expired
3409Duplicate Discovery Request
3410Expired Key Pair
3413No Link Request Found
3416Consent Artefact Not Found
3417Invalid Consent Status
3429Duplicate Request
3500Internal Server Error
3501OTP Generation Failed
3502Health Information Not Found
3507Failed to Get Linked Care-Contexts

HIU Bridge/Health-Repository Error Codes

CodeDescriptionExplanation
4400Bad RequestRequired attributes not provided or Request information is not as expected
4401Unauthorized request
4404Consent request not found
4406Invalid Data Flow Entry
4407Patient Not Found
4420Invalid Purpose of Use
4422Invalid Data from Gateway
4450Invalid Username or password
4500Unknown error occurred
4504No result from Gateway
4550Undefined queue
4551Consent Artefact not found
4552Validation failed
4553Failed to Notify Consent Manager
4503SERVICE_DOWN

Clone this wiki locally