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

security: always return generic 500 error #197

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

hoangvvo
Copy link
Owner

@hoangvvo hoangvvo commented Jul 6, 2022

For security reason, we should always respond with "internal server error" while logging the error to console instead of responding with the error stack

Close #118

@changeset-bot
Copy link

changeset-bot bot commented Jul 6, 2022

⚠️ No Changeset found

Latest commit: 8d5461e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #197 (8d5461e) into main (f0a1043) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #197   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          248       248           
  Branches        43        43           
=========================================
  Hits           248       248           
Impacted Files Coverage Δ
src/node.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 f0a1043...8d5461e. Read the comment docs.

@hoangvvo hoangvvo merged commit e13c213 into main Jul 6, 2022
@hoangvvo hoangvvo deleted the internal-error-by-default branch July 6, 2022 10:56
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.

Default on error should simply return 500 with a generic error message
1 participant