Closed akheron closed 3 years ago
Not sure if console.error()
is the best way to print the exception.
I didn't replace other report.panic()
calls because they mostly seem to be problems that the developer can avoid during development. The error I actually want to ignore is when Algolia rejects an indexing operation because of too big a payload.
what kind of error do you get that requires this to happen?
The error I actually want to ignore is when Algolia rejects an indexing operation because of too big a payload.
That means one of the documents I want to index are too big, and this should be fixed in the data. Stale data in algolia is fine meanwhile.
This is an interesting situation, since I think you should split the records up in smaller fragments, then using distinct to show only one hit per "document". This can be done within transformItems, and should be a thing you only need to set up once.
I'm kinda hesitant to add this option, since I can't find reference of any other plugins that allow this shortcutting, but also none of them really seem to have these kind of errors.
Maybe this lives better as a patch for you (using patch-package) or putting the code in your own code base?
Is there a typo in this?
I get an "report is not defined" error on report.warn('failed to index to Algolia')
. Glancing at the code, it looks like this should be reporter.warn()
?
fixed in 0.20.1, thanks for noticing @sebpettersson
This will let the build continue even if Algolia indexing fails.