diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-18 04:00:15 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-18 04:00:15 +0800 |
commit | 2cc03216bd3642c9101c19f309895f0d3b13e82e (patch) | |
tree | 50e0e58eec500327bee9564a4738a53d11e8448a /packages/website | |
parent | cd4e679db79c37d4a2712de1064f952a3ce83585 (diff) | |
download | dexon-sol-tools-2cc03216bd3642c9101c19f309895f0d3b13e82e.tar dexon-sol-tools-2cc03216bd3642c9101c19f309895f0d3b13e82e.tar.gz dexon-sol-tools-2cc03216bd3642c9101c19f309895f0d3b13e82e.tar.bz2 dexon-sol-tools-2cc03216bd3642c9101c19f309895f0d3b13e82e.tar.lz dexon-sol-tools-2cc03216bd3642c9101c19f309895f0d3b13e82e.tar.xz dexon-sol-tools-2cc03216bd3642c9101c19f309895f0d3b13e82e.tar.zst dexon-sol-tools-2cc03216bd3642c9101c19f309895f0d3b13e82e.zip |
manually trigger error and also send in newsletter errors
Diffstat (limited to 'packages/website')
-rw-r--r-- | packages/website/ts/@next/components/newsletter_form.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/website/ts/@next/components/newsletter_form.tsx b/packages/website/ts/@next/components/newsletter_form.tsx index f7cc43964..eef496982 100644 --- a/packages/website/ts/@next/components/newsletter_form.tsx +++ b/packages/website/ts/@next/components/newsletter_form.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import styled, { withTheme } from 'styled-components'; -import { colors } from 'ts/style/colors'; - import { ThemeValuesInterface } from 'ts/@next/components/siteWrap'; +import { colors } from 'ts/style/colors'; +import { errorReporter } from 'ts/utils/error_reporter'; interface FormProps { theme: ThemeValuesInterface; @@ -86,6 +86,10 @@ class Form extends React.Component<FormProps> { this.setState({ isSubmitted: true }); + if (email === 'triggererror@0xproject.org') { + throw new Error('Manually triggered error'); + } + try { const response = await fetch('https://website-api.0x.org/newsletter_subscriber/substack', { method: 'post', @@ -96,7 +100,7 @@ class Form extends React.Component<FormProps> { body: JSON.stringify({ email, referrer }), }); } catch (e) { - // dosomething + errorReporter.report(e); } } } |