Sometimes your function still throws me this error
Object doesn't support property or method 'error'
No idea what arguments have been used (form my production site with lots of visits) but since you claim safe-json-stringify is safe, would be good to cover this case as well :)