mirror of
https://github.com/covidpass-org/covidpass.git
synced 2025-02-22 14:37:51 +01:00
Send Promise reject as an Error, not a string
* Also filter from Sentry reporting
This commit is contained in:
parent
384624605a
commit
06e360df87
@ -137,7 +137,8 @@ function Form(): JSX.Element {
|
||||
|
||||
// Don't report known errors to Sentry
|
||||
if (!e.message.includes('invalidFileType') &&
|
||||
!e.message.includes('not digitally signed')) {
|
||||
!e.message.includes('not digitally signed') &&
|
||||
!e.message.includes('No valid ON proof-of-vaccination')) {
|
||||
Sentry.captureException(e);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ function Page(props: PageProps): JSX.Element {
|
||||
<a href="https://github.com/billylo1/covidpass" className="underline">{t('common:gitHub')}</a>
|
||||
<a href="https://vaccine-ontario.ca" className="underline">{t('common:returnToMainSite')}</a>
|
||||
</nav>
|
||||
<div className="flex pt-4 flex-row space-x-4 justify-center text-md flex-wrap">Last updated: 2021-10-06 (v1.9.22)</div>
|
||||
<div className="flex pt-4 flex-row space-x-4 justify-center text-md flex-wrap">Last updated: 2021-10-06 (v1.9.23)</div>
|
||||
</footer>
|
||||
</main>
|
||||
</div>
|
||||
|
@ -289,7 +289,7 @@ async function processSHC(fileBuffer : ArrayBuffer) : Promise<any> {
|
||||
console.log(code);
|
||||
|
||||
if (!code) {
|
||||
return Promise.reject('No valid ON proof-of-vaccination digital signature found! Please make sure you download the PDF directly from covid19.ontariohealth.ca, Save as Files on your iPhone, and do NOT save/print it as a PDF!');
|
||||
return Promise.reject(new Error('No valid ON proof-of-vaccination digital signature found! Please make sure you download the PDF directly from covid19.ontariohealth.ca, Save as Files on your iPhone, and do NOT save/print it as a PDF!'));
|
||||
}
|
||||
|
||||
const rawData = code.data;
|
||||
|
@ -3,7 +3,7 @@ import { Integrations } from '@sentry/tracing';
|
||||
|
||||
export const initSentry = () => {
|
||||
SentryModule.init({
|
||||
release: 'grassroots_covidpass@1.9.22', // App version. Needs to be manually updated as we go unless we make the build smarter
|
||||
release: 'grassroots_covidpass@1.9.23', // App version. Needs to be manually updated as we go unless we make the build smarter
|
||||
dsn: 'https://7120dcf8548c4c5cb148cdde2ed6a778@o1015766.ingest.sentry.io/5981424',
|
||||
integrations: [
|
||||
new Integrations.BrowserTracing(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user