Add name to WHEN_TIMEOUT error if available#3599
Add name to WHEN_TIMEOUT error if available#3599evelant wants to merge 2 commits intomobxjs:mainfrom
Conversation
|
mweststrate
left a comment
There was a problem hiding this comment.
Sorry for the late follow up. I imagine WHEN_TIMEOUT is an error message that is programmatically checked against in catch handlers, so I think it'd be better to store the debug name in a separate property on the same error object. E.g whenName or something like that.
|
This may break the logic associated with checking for a timeout error. |
It's useful to have a name attached to the WHEN_TIMEOUT error for debugging/tracing. Since
whenalready takes a name as an option this PR just adds the name to the WHEN_TIMEOUT error if it is available.Code change checklist
/docs. For new functionality, at leastAPI.mdshould be updatedyarn mobx test:performance)