Skip to content

middleware/router.js: TypeError: Cannot read property 'key' of null #1203

Open
@euanmillar

Description

Hi,

I hope you are all doing well. We have been refactoring our database clear and restore process at OpenCRVS and we have encountered this strange OpenHIM error. It occurs after we clear our database and then seed it using APIs. Strangely, if we try the command a second time, it always works. Its a bit of a hacky solution causing some confusing output to the user so I was wondering if someone could take a look at what might be causing it please?:

"msg":"request to http://localhost:5001/fhir/Practitioner failed, reason: socket hang up"

[1] openhim-core_1 | events.js:377
[1] openhim-core_1 | throw er; // Unhandled 'error' event
[1] openhim-core_1 | ^
[1] openhim-core_1 |
[1] openhim-core_1 | TypeError: Cannot read property 'key' of null
[1] openhim-core_1 | at /usr/src/app/lib/middleware/router.js:245:23
[1] openhim-core_1 | at handler (/usr/src/app/lib/utils.js:91:14)
[1] openhim-core_1 | at /usr/src/app/node_modules/mongoose/lib/model.js:5074:18

Kind regards,

Euan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions