diff --git a/tavla/pages/[id].tsx b/tavla/pages/[id].tsx index 04668426b..a7929d6c8 100644 --- a/tavla/pages/[id].tsx +++ b/tavla/pages/[id].tsx @@ -10,55 +10,30 @@ import { useRefresh } from 'hooks/useRefresh' import { getBackendUrl } from 'utils/index' import Head from 'next/head' import { useEffect } from 'react' -import { GetServerSideProps } from 'next' -import * as Sentry from '@sentry/nextjs' -export const getServerSideProps: GetServerSideProps = async (context) => { - try { - const { params, req } = context - if (!params || !req) { - Sentry.captureMessage('Missing params or req in getServerSideProps') - return { - notFound: true, - } - } - const { id } = params as { id: string } - - if (!id) { - Sentry.captureMessage('Missing board ID in getServerSideProps') - return { - notFound: true, - } - } - - const board: TBoard | undefined = await getBoard(id) - - if (!board) { - //Sentry.captureMessage('Board is undefined in getServerSideProps') - return { - notFound: true, - } - } - - const organization = await getOrganizationWithBoard(id) +export async function getServerSideProps({ + params, +}: { + params: { id: string } +}) { + const { id } = params + const board: TBoard | undefined = await getBoard(id) - return { - props: { - board, - organization, - backend_url: getBackendUrl(), - }, - } - } catch (error) { - Sentry.captureException(error, { - extra: { - message: 'Unknown error occurred in getServerSideProps', - }, - }) + if (!board) { return { notFound: true, } } + + const organization = await getOrganizationWithBoard(id) + + return { + props: { + board, + organization, + backend_url: getBackendUrl(), + }, + } } function BoardPage({ diff --git a/tavla/src/Board/scenarios/QuayTile/index.tsx b/tavla/src/Board/scenarios/QuayTile/index.tsx index d7f8a25c8..db3ff4ceb 100644 --- a/tavla/src/Board/scenarios/QuayTile/index.tsx +++ b/tavla/src/Board/scenarios/QuayTile/index.tsx @@ -10,7 +10,6 @@ import { DataFetchingFailed, FetchErrorTypes, } from 'Board/components/DataFetchingFailed' -import * as Sentry from '@sentry/nextjs' export function QuayTile({ placeId, @@ -40,16 +39,6 @@ export function QuayTile({ } if (error || !data || !data.quay) { - if (!error) { - Sentry.captureException( - new Error('Departure fetch for quay returned no data'), - { - extra: { - quayId: placeId, - }, - }, - ) - } return (