You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If successCallback is called after it, can it mean that the command will be handled despite the error?
rejectionCallback
Does its call guaranty, that all other callbacks won't be called?
Can it be called after successCallback or errorCallback?
The above clarifications are necessary to implement the scenario of optimistic updating of data on the client. For example, the client sends the command to update some model entity, the specified entity on the client side is optimistically updated with the expected value. Then the client starts to wait for the corresponding entity updates from the subscription (subscribeToEntities method).
When the updated data can be displayed? Can it be displayed after sendCommand execution immediately or should it wait for the successCallback invocation? (BTW, waiting for the successCallback can result in the UI holdup in case of a slow internet connection).
When the errorCallback is called before the updated state received, should the previous entity state be restored? Should it be restored if the error is connection-kind?
When it is reasonable to show the message of command sending failure?
If the updated state is received from the subscription, should we ignore any further errorCallback invocations from the sendCommand?
The text was updated successfully, but these errors were encountered:
The current description of the
sendCommand
method does not expose all the nuances of its use.successCallback
(better rename toacknowledged
)errorCallback
error
object, and what does each of its types means in the context ofsendCommand
invocation? (see Reconsider the approach to the formation of errors given by thespine-web-client
#26 for error classification proposal)successCallback
is called after it, can it mean that the command will be handled despite the error?rejectionCallback
successCallback
orerrorCallback
?The above clarifications are necessary to implement the scenario of optimistic updating of data on the client. For example, the client sends the command to update some model entity, the specified entity on the client side is optimistically updated with the expected value. Then the client starts to wait for the corresponding entity updates from the subscription (
subscribeToEntities
method).sendCommand
execution immediately or should it wait for thesuccessCallback
invocation? (BTW, waiting for thesuccessCallback
can result in the UI holdup in case of a slow internet connection).errorCallback
is called before the updated state received, should the previous entity state be restored? Should it be restored if the error is connection-kind?errorCallback
invocations from thesendCommand
?The text was updated successfully, but these errors were encountered: