diff --git a/CHANGELOG.md b/CHANGELOG.md index 710e693b9..af21d90f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased][latest] +### Fixed +- utf8 encode JSON payload in Node ## [3.0.1] - 2021-01-20 ### Fixed diff --git a/src/server.ts b/src/server.ts index 184b657e3..982137c5d 100644 --- a/src/server.ts +++ b/src/server.ts @@ -54,7 +54,7 @@ class Honeybadger extends Client { getStats((stats: Record) => { payload.server.stats = stats - const data = JSON.stringify(sanitize(payload, this.config.maxObjectDepth)) + const data = Buffer.from(JSON.stringify(sanitize(payload, this.config.maxObjectDepth)), 'utf8') const options = { method: 'POST', headers: {