Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Server): fix responding with application/json when using custom servers #700

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

chentsulin
Copy link
Collaborator

Got the following error when provide a { } object to the res.end() method.

TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer. Received an instance of Object

Fix it by attaching the Content-Type: application/json; charset=utf-8 header.

@codecov-io
Copy link

codecov-io commented Mar 26, 2020

Codecov Report

Merging #700 into master will decrease coverage by 0.07%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #700      +/-   ##
==========================================
- Coverage    80.9%   80.83%   -0.08%     
==========================================
  Files         108      108              
  Lines        4489     4493       +4     
  Branches     1109     1122      +13     
==========================================
  Hits         3632     3632              
+ Misses        811      810       -1     
- Partials       46       51       +5
Impacted Files Coverage Δ
packages/bottender/src/server/Server.ts 9.75% <0%> (-0.51%) ⬇️
packages/bottender/src/getClient.ts 55.55% <0%> (ø) ⬆️
packages/create-bottender-app/src/shared/log.ts 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a6c8a2...e775210. Read the comment docs.

@chentsulin chentsulin merged commit 5af50cc into master Mar 26, 2020
@chentsulin chentsulin deleted the fix-json-response branch March 26, 2020 07:52
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.

3 participants