Closed robinedman closed 9 years ago
I tend to gravitate towards less ceremony and more duck typing myself (i.e. the 2nd option) but I'm fine with either! :)
Was just about to mention this. Would be nice to be able to debug these with some more information. Having said that, we are mostly just ignoring Sentry errors so I'm not sure this will help that much.
Is fixed in https://github.com/guardian/scribe-plugin-noting/pull/60, I'll close this when it's merged.
@robinedman I think I would lean towards option two as well and if you still have a type or validity check push it to boundaries of the code path
Right now we have a handleError function which gives us a full print out a focus which causes error. I think @theefer has a very good point here: https://github.com/guardian/scribe-plugin-noting/pull/60#discussion-diff-22654506 I'll migrate to this solution at a later date
At the moment we have type checking like:
(https://github.com/guardian/scribe-plugin-noting/blob/jp-refactor-note-toggle/src/utils/noting/find-entire-note.js#L23)
When this is thrown we don't get any info about what
focus
actually is. In this sense it's harder to debug what actually happened than if we wouldn't have had it all.Could we either: