Cannot read property 'resourceType' of undefined f...
# support
a
I am trying to subscribe to the specified communication criteria but encountering the following exception.I am Attaching screenshot for the same. Could you please assist me in resolving the issue? I am following the implementation given in below link. Could not find any other documentation for this. https://github.com/medplum/medplum/blob/main/packages/react/src/NotificationIcon/NotificationIcon.tsx import { useSubscription } from '@medplum/react-hooks'; useSubscription(
Communication?recipient=78f5bb86-db26-46ff-8876-3e2586bfd25f
, () => { // Log or handle the event console.log("Received event:"); });
Hi @reshma @rahul1 , I've resolved this issue mentioned above by refactoring the login code. Initially, API calls were implemented instead of the Medplum function for processCode(). However, I'm now facing a different issue: I am not receiving messages through WebSocket. After debugging, I found that subscriptions are being created, and the binding token for the subscription is also generated; however, the message sent by creating the communication resource is still not being received. Could you please help me resolve this?
c
@rahul1 Could you please help to resolve this? Thanks