Skip to content

fix cannot convert object to primitive value#335

Open
nusr wants to merge 1 commit into
fullstack-build:masterfrom
nusr:master
Open

fix cannot convert object to primitive value#335
nusr wants to merge 1 commit into
fullstack-build:masterfrom
nusr:master

Conversation

@nusr

@nusr nusr commented Jun 11, 2026

Copy link
Copy Markdown

fix #329

Uncaught (in promise) TypeError: Cannot convert object to primitive value
    at String (<anonymous>)
    at BaseLogger.js:205:25
    at Array.reduce (<anonymous>)
    at formatErrorMessage (BaseLogger.js:200:14)
    at Object.prettyFormatErrorObj (BaseLogger.js:67:31)
    at maskedArgs.reduce.args (BaseLogger.js:50:52)
    at Array.reduce (<anonymous>)
    at Object.prettyFormatLogObj (BaseLogger.js:48:31)
    at CustomerLogger.log (BaseLogger.js:649:72)
    at CustomerLogger.error (index.js:32:22)

@terehov

terehov commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Thank you very much. Will land in the coming release

terehov pushed a commit that referenced this pull request Jun 27, 2026
Route error property values through stringifyFallback so logging an
error whose property is a null-prototype object or has a throwing
toString/Symbol.toPrimitive no longer crashes formatting.
terehov added a commit that referenced this pull request Jun 27, 2026
Route error property values through stringifyFallback so logging an
error whose property is a null-prototype object or has a throwing
toString/Symbol.toPrimitive no longer crashes formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question: Is it possible to overwrite formatErrorMessage?

2 participants