Implement on-complete
event instead of on-error
and on-success
in keycard flow
#22166
Labels
on-complete
event instead of on-error
and on-success
in keycard flow
#22166
Problem
In keycard flows and events, such as
keycard/connect
and:keycard/get-application-info
, we are currently passing two props: on-success and on-error. I believe we should migrate to a single prop, on-complete, which includes an error parameter. Why?We are checking for errors in on-error and conditionally performing positive actions based on that in on-error, which seems confusing. Examples can be found here: Link 1 and Link 2.
Sometimes, we need to perform a positive action in both the on-success and on-error cases. In such scenarios, we are currently passing both parameters, where on-success directly performs the positive action, while on-error conditionally performs the same action. Instead, we can pass a single parameter in these cases.
Please feel free to suggest better name for the parameter instead of on-complete
The text was updated successfully, but these errors were encountered: