Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
euanmillar opened this issue Aug 14, 2023 · 1 comment
Open

Comments

@euanmillar
Copy link

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

@euanmillar
Copy link
Author

FYI, we are using this docker image: jembi/openhim-core:7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant