Open dentuzhik opened 5 months ago
@waltjones @mudetroit apologies for tagging directly, I would appreciate if we can review this and draft a new patch release.
This issue causing a crash for us in production, the backup plan so far is to go through publishing an internal fork via private registry package, but we would still want to switch back to public version.
Description of the change
We are using
rollbar.js
in our application, and because of internal monkey-patching ofconsole.warn
some instances of invariants triggered byapollo-client
crash rollbar and our application as a result.When
apollo-client
logs those invariants viaconsole.warn
it has some of the arguments specified as array of objects, which get through theformatArgsAsString
inside rollbar, which does not really handle arrays anyhow and crashes.This change adds graceful handling of the arrays via a simple recursive call, trimming the array to the first 10 items not to cause any significant overhead on processing.
Type of change
Related issues
Checklists
Development
Code review