You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught TypeError: Cannot convert object to primitive value
at Array.join (<anonymous>)
at prettyFormatErrorObj (/project/node_modules/tslog/dist/cjs/runtime/nodejs/index.js:107:14)
at maskedArgs.reduce.args (/project/node_modules/tslog/dist/cjs/runtime/nodejs/index.js:89:43)
at Array.reduce (<anonymous>)
at Object.prettyFormatLogObj (/project/node_modules/tslog/dist/cjs/runtime/nodejs/index.js:88:23)
at Logger.log (/project/node_modules/tslog/dist/cjs/BaseLogger.js:113:77)
at Logger.error (/project/node_modules/tslog/dist/cjs/index.js:49:22)
const{ Logger }=require('tslog');const{ GraphQLError }=require('graphql');constlog=newLogger();log.error(newGraphQLError("Error in your graphql server"));
Expected behavior
Logger should not throw an error.
Additional context
tslog@4.9.2
graphql@16.8.1
Node.js Version
v18.16.1
OS incl. Version
macOS 13.5.2
The text was updated successfully, but these errors were encountered:
Describe the bug
Uncaught TypeError:
Main problem is Array.join(', ') here: https://github.com/fullstack-build/tslog/blob/master/src/runtime/nodejs/index.ts#L135
because GraphQLError is using
Object.create(null)
forextensions
property: https://github.com/graphql/graphql-js/blob/main/src/error/GraphQLError.ts#L125Maybe filter out such values before joining? e.g.
To Reproduce
Expected behavior
Logger should not throw an error.
Additional context
tslog@4.9.2
graphql@16.8.1
Node.js Version
v18.16.1
OS incl. Version
macOS 13.5.2
The text was updated successfully, but these errors were encountered: