UCWA2.0-CS
UCWA2.0-CS copied to clipboard
Add Reason to UcwaEvents
For ParticipantInvitation events, if the state is 'Failure' the 'Reason' object from the response is not passed down, so the client does not get any detailed information regarding the failure.
If Reason is added to the Event object, it can also be passed to the event delegates. I have made this change locally and added another delegate to pass along the reason information. I'm not sure how best to solve for all cases?
Example below:
"events" : [{ "link" : { "rel" : "participantInvitation", "href" : "/ucwa/oauth/v1/applications/asdf/communication/participantInvitations/..." }, "status" : "Failure", "_embedded" : { "participantInvitation" : { "direction" : "Outgoing", "importance" : "Normal", "state" : "Failed", ... }, "rel" : "participantInvitation" } }, "reason" : { "code" : "RemoteFailure", "subcode" : "Declined", "message" : "Your invitation was declined." }, "type" : "completed" } ]
Hi @elav000 sorry for the late reply. Do you think you could author a PR for that?
didn't we already done this?
I think we did it for errors but not for events so far.