diff --git a/packages/webapp/src/classes/client/rest-client/index.ts b/packages/webapp/src/classes/client/rest-client/index.ts index aa0f3457..50e95028 100644 --- a/packages/webapp/src/classes/client/rest-client/index.ts +++ b/packages/webapp/src/classes/client/rest-client/index.ts @@ -640,7 +640,7 @@ export default class RestClient implements Client { reject: (error: ErrorInfo) => void, ) => { this.axios - .post(`${this.baseUrl}/service/users/googleCallback?code=${code}`, { + .post(`${this.baseUrl}/service/oauth2/googlecallback?code=${code}`, { headers: { 'Content-Type': 'application/json' }, }) .then((response) => { @@ -661,7 +661,7 @@ export default class RestClient implements Client { confirmAccountSync(email: string, code: string): Promise { const handler = (success: () => void, reject: (error: ErrorInfo) => void) => { this.axios - .put(`${this.baseUrl}/service/users/confirmAccountSync?email=${email}&code=${code}`, { + .put(`${this.baseUrl}/service/oauth2/confirmaccountsync?email=${email}&code=${code}`, { headers: { 'Content-Type': 'application/json' }, }) .then(() => { diff --git a/packages/webapp/src/components/registration-callback/index.tsx b/packages/webapp/src/components/registration-callback/index.tsx index 3947b4fd..4b56b932 100644 --- a/packages/webapp/src/components/registration-callback/index.tsx +++ b/packages/webapp/src/components/registration-callback/index.tsx @@ -53,6 +53,7 @@ const RegistrationCallbackPage = (): React.ReactElement => { .catch((error) => { console.log('ERROR', error); setCallbackError(true); + window.newrelic?.noticeError(error); }); }, []); @@ -64,6 +65,7 @@ const RegistrationCallbackPage = (): React.ReactElement => { }) .catch((error) => { console.log('ERROR', error); + window.newrelic?.noticeError(error); }); }; diff --git a/packages/webapp/src/index.tsx b/packages/webapp/src/index.tsx index 9c7b460c..0b0ae125 100644 --- a/packages/webapp/src/index.tsx +++ b/packages/webapp/src/index.tsx @@ -4,6 +4,12 @@ import React from 'react'; import App from './app'; import { createRoot } from 'react-dom/client'; +declare global { + interface Window { + newrelic: { noticeError: (Error) => void }; + } +} + const container = document.getElementById('root') as HTMLElement; const root = createRoot(container!); root.render();