src/common/util.ts/logError
export function logError(logger: { error: (msg: string) => void }, prefix: string, err: unknown): void {
  if (err instanceof Error) {
    logger.error(`${prefix}: ${err.message} ${err.stack}`)
  } else {
    logger.error(`${prefix}: ${err}`)
  }
}