SceneVariableSet: Store the whole error object instead of the error message#972
SceneVariableSet: Store the whole error object instead of the error message#972
Conversation
torkelo
left a comment
There was a problem hiding this comment.
Have you tested this with ControlsLabel ?
We should the error in the Variable label component, currently it expects a string
No, I missed it, fixed in b1b43b2 |
torkelo
left a comment
There was a problem hiding this comment.
would not logging the error be enough, do we need to store it?
Hi @torkelo , sorry I've been busy on other fronts... Now, the error message is logged with the console. What if the app uses a custom logger that's interested in the stack trace or other properties that the error contains? We need to store the whole error object to allow the custom logger to inspect it and send anything interesting about the error wherever it wants (the console or Faro or...). What's your concern? |
torkelo
left a comment
There was a problem hiding this comment.
See that error is very poorly typed on SceneVariableState
If we are to make this breaking change we need to change the error type to Error
Currently, when an error happens during the
validateAndUpdateobservable / RxJS process, we only store the error message.After this PR, the whole error object will be stored, which can then be used to to inspect its cause, stack traces or any other custom property.
This issue relates to #371