UCWA2.0-CS icon indicating copy to clipboard operation
UCWA2.0-CS copied to clipboard

Add Reason to UcwaEvents

Open elav000 opened this issue 7 years ago • 3 comments

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" } ]

elav000 avatar Nov 09 '17 14:11 elav000

Hi @elav000 sorry for the late reply. Do you think you could author a PR for that?

baywet avatar Dec 21 '17 13:12 baywet

didn't we already done this?

kenakamu avatar May 04 '18 08:05 kenakamu

I think we did it for errors but not for events so far.

baywet avatar May 04 '18 17:05 baywet