next-axiom
next-axiom copied to clipboard
TypeError: Cannot read properties of undefined (reading '_log')
Sometimes I'm seeing a popup that looks like this:

And there's no way for me to know where this error is coming from, or what's causing this.
There should probably be a more meaningful error message that would help people understand what's going on.
But meanwhile - can you help me figure out how to find the source of the problem and fix it?
Hmm... Looks like this is triggered when an axios request throws any kind of error. So this line triggers it:
await axios.post("123", {})
Very weird and unexpected. If there's no await
in front of axios, this error doesn't pop up.
Either way, whatever's going on with this issue, that makes it extremely difficult to debug things.
hmm, this is weird. not sure whats happening, but I am guessing when axios throws an error, next-axiom captures that and tries to send the log to axiom, but somehow this
context in our logger becomes undefined
. which next-axiom version are you using?
@lumenwrites I tried to reproduce the issue by using axios to call an invalid url, but I saw a normal 404 error. can you maybe provide an example that could reproduce the issue or some insight on your setup.
@lumenwrites haven't heard back from you for a while, I will close this issue now but please let me know if this is still happening. thx.