* Package updates * Fix up things that look broken * Add to utils * Lead now just sets font size, just use f3 where needed * Update package-lock.json * Update index.tsx * Delete bump-link.scss * Update trigger-error.js * Update components/GenericError.tsx Co-authored-by: Ash Guillaume <10384315+ashygee@users.noreply.github.com> * Update ArticlePage.tsx * Update ActionBar.tsx * Changes from meeting * Found a few more monos * Fix from a merge conflict * Missed a few f3s * Update SubLandingHero.tsx * Bye gradients * Match up breadcrumbs * Update SubLandingHero.tsx * Update lists.scss Co-authored-by: Ash Guillaume <10384315+ashygee@users.noreply.github.com>
14 lines
587 B
JavaScript
14 lines
587 B
JavaScript
// This module is for testing our handling of uncaught async rejections on incoming requests
|
|
|
|
// IMPORTANT: Leave this function as `async` even though it doesn't need to be!
|
|
export default async function triggerError(req, res, next) {
|
|
// IMPORTANT:
|
|
// Do NOT wrap this method's contents in the usual `try-catch+next(error)`
|
|
// pattern used on async middleware! This is an intentional omission!
|
|
|
|
// prevent this from being used in production
|
|
if (process.env.NODE_ENV === 'production' && process.env.HEROKU_PRODUCTION_APP) return next()
|
|
|
|
throw new Error('Intentional error')
|
|
}
|