Open
Conversation
isaacwhite
reviewed
Dec 4, 2020
| <div class="tagline"> | ||
| <h1><%- template('error.500.heading') %></h1> | ||
| <p><%- template('error.500.message') %></p> | ||
| <% if (locals.isDev && locals.err && locals.err.message) { %> |
Member
There was a problem hiding this comment.
👍 Should we include the full trace here, too?
server/routes/errors.js
Outdated
| const inlined = await loadInlineAssets() | ||
| res.status(code).render(`errors/${code}`, { | ||
| inlineCSS: inlined.css, | ||
| isDev: process.env.NODE_ENV === 'development', |
|
|
||
| if (page === 'categories' || page === 'index') { | ||
| const tree = await getTree() | ||
| if (!tree.children) { |
Member
There was a problem hiding this comment.
👍 This signal is great. It also seems like we could easily make this nonfatal (log, but have the library site be empty) if we wanted.
server/utils.js
Outdated
| const level = fs.existsSync(customPath) ? 'warn' : 'debug' | ||
| log[level](`Failed pulling in custom file ${attemptPath} @ ${customPath}. Error was:`, err) | ||
| // with no stacktrace. | ||
| const fileExists = fs.existsSync(customPath) |
Member
There was a problem hiding this comment.
👍 This also seems like a useful signal. Let's make sure it merges cleanly with the other open PR for this case, https://github.com/nytimes/library/pull/202/files
isaacwhite
requested changes
Dec 4, 2020
Member
isaacwhite
left a comment
There was a problem hiding this comment.
These all seem like great usability improvements, thanks for tackling @afischer!
It looks like we have some merge conflicts, once we resolve those I think these will be great additions 👏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Still in progress, but feel free to comment!
Description of Change
clientSecretandclientIdin dev mode to avoid having to set them in your .envTodo:
Related Issue
Closes #62, closes #63
Checklist
npm run lintand updated code style accordinglynpm run testpasses