Skip to content

Commit

Permalink
fix: usage of GRPCError.toJSON in go-bridge logger
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Meier <norman@berty.tech>
  • Loading branch information
n0izn0iz committed Nov 10, 2021
1 parent 8959e0c commit 2d85502
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/packages/go-bridge/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { GoBridgeInterface, GoLogLevel } from './types'

const stringifyReplacer = (key: string, value: any): any => {
if (value instanceof GRPCError) {
return GRPCError.toJSON()
return value.toJSON()
}

if (value instanceof Error) {
var error: { [key: string]: any } = {}
Object.getOwnPropertyNames(value).forEach(key => {
error[key] = value[key]
error[key] = (value as any)[key]
})
return error
}
Expand Down

0 comments on commit 2d85502

Please sign in to comment.