Howard86 / next-api-handler

lightweight nextjs api handler wrapper, portable & configurable for serverless environment
https://next-api-handler.vercel.app
Other
50 stars 1 forks source link

[Bugfix] fix sending response when header is sent #22

Closed Howard86 closed 2 years ago

Howard86 commented 2 years ago

Bug fix

it will throw error if header is sent, e.g. we use res.direct in the handler

it shall not throw error as we prevent calling res.send

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/howard86/next-api-handler/HF5j9hHXMn7iYevgGLmJYcUsG2X1
✅ Preview: https://next-api-handler-git-bugfix-fix-sending-respons-aae240-howard86.vercel.app

cypress[bot] commented 2 years ago



Test summary

11 0 0 0


Run details

Project next-api-handler
Status Passed
Commit c35863a86d
Started Feb 24, 2022 11:34 AM
Ended Feb 24, 2022 11:34 AM
Duration 00:19 💡
OS Linux Debian - 10.8
Browser Electron 94

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

codecov[bot] commented 2 years ago

Codecov Report

Merging #22 (c35863a) into main (fa5b3fe) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #22   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           98        99    +1     
  Branches        11        12    +1     
=========================================
+ Hits            98        99    +1     
Impacted Files Coverage Δ
src/lib/router-builder.ts 100.00% <100.00%> (ø)

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 fa5b3fe...c35863a. Read the comment docs.

codeclimate[bot] commented 2 years ago

Code Climate has analyzed commit c35863a8 and detected 0 issues on this pull request.

View more on Code Climate.