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

[now dev] Support JSON and HTML error responses #2677

Merged
merged 14 commits into from Aug 2, 2019

Conversation

TooTallNate
Copy link
Member

@TooTallNate TooTallNate commented Jul 31, 2019

Using the same templates as the production proxy uses, but converted to doT.js format.

Closes #2609.

Screen Shot 2019-07-31 at 12 21 37 PM

@codecov-io
Copy link

codecov-io commented Jul 31, 2019

Codecov Report

Merging #2677 into canary will increase coverage by 0.09%.
The diff coverage is 31.91%.

Impacted file tree graph

@@            Coverage Diff            @@
##           canary   #2677      +/-   ##
=========================================
+ Coverage    8.14%   8.24%   +0.09%     
=========================================
  Files         259     260       +1     
  Lines       10470   10516      +46     
  Branches     1328    1339      +11     
=========================================
+ Hits          853     867      +14     
- Misses       9559    9591      +32     
  Partials       58      58
Impacted Files Coverage Δ
src/util/dev/server.ts 12.38% <21.87%> (+0.34%) ⬆️
src/util/dev/errors.ts 53.33% <53.33%> (ø)
src/util/prefer-v2-deployment.ts 62.5% <0%> (-6.95%) ⬇️
src/util/metrics.ts 61.53% <0%> (-6.65%) ⬇️

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 f60a373...c26e83d. Read the comment docs.

@TooTallNate TooTallNate changed the title [now dev] WIP Support JSON and HTML error responses [now dev] Support JSON and HTML error responses Aug 1, 2019
Copy link
Contributor

@AndyBitz AndyBitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add integration tests to check if the correct pages are returned?

@TooTallNate TooTallNate merged commit 75d98c6 into canary Aug 2, 2019
@TooTallNate TooTallNate deleted the add/now-dev-404-template branch August 2, 2019 00:56
AndyBitz pushed a commit that referenced this pull request Aug 5, 2019
* [now dev] Support JSON and HTML error responses

Closes #2609.

* Compile templates for unit tests in CircleCI

* Update `ts-node` to v8.3.0

* Convert doT.js compiled templates to TypeScript

* Compile templates for lint tests in CircleCI

* Print convert time

* Add 502 error template

* Remove `message` param from `sendError()`

* Prettier

* Add 404 tests

* Fix test
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.

Replicate platform error style in now dev
4 participants