Closed jakofranko closed 6 years ago
Ah right. I was suppressing that because I wouldn't want a bunch of failed validations to clog the log (since it can just mean bad user-input). But I think it hurts debugging more to not say anything, so let's do two things: emit an event, and console.debug/log it. We can consider a flag to disable that logging too
I've been playing around with this trying to learn it (very exciting!!!), and was really struggling to get any records to show up in my test DB. As I drilled into things, I realized that I had a copy/paste error in my code:
assert
is not defined and thus a Reference Error was getting thrown, but the try/catch block inindexer.js
just setsisValid = false;
and ditches the error, so I had no idea what the problem was. What are your thoughts of throwing the error if it catches one? It'll be a simple enough fix, so you may see a PR from me later 😬 .Here's the snippet from
indexer.js
I'm talking about: