diff --git a/front/pages/poke/connectors/[connectorId]/index.tsx b/front/pages/poke/connectors/[connectorId]/index.tsx index 3fd521dd177e..fdb224dacc6f 100644 --- a/front/pages/poke/connectors/[connectorId]/index.tsx +++ b/front/pages/poke/connectors/[connectorId]/index.tsx @@ -7,12 +7,10 @@ import logger from "@app/logger/logger"; export const getServerSideProps: GetServerSideProps = async (context) => { const session = await getSession(context.req, context.res); - const auth = await Authenticator.fromSuperUserSession( - session, - context.params?.wId as string - ); + const auth = await Authenticator.fromSuperUserSession(session, null); if (!auth.isDustSuperUser()) { + logger.error("poke: not superUser"); return { notFound: true, }; @@ -21,6 +19,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => { const connectorId = context.params?.connectorId; if (!connectorId || typeof connectorId !== "string") { + logger.error({ connectorId }, "poke: connectorId is not a string"); return { notFound: true, }; @@ -29,6 +28,10 @@ export const getServerSideProps: GetServerSideProps = async (context) => { const connectorsAPI = new ConnectorsAPI(logger); const cRes = await connectorsAPI.getConnector(connectorId); if (cRes.isErr()) { + logger.error( + { connectorId, error: cRes.error }, + "poke: error fetching connector" + ); return { notFound: true, };