diff --git a/packages/backend/src/handlers/actions/ceramic/linkProfileNode.ts b/packages/backend/src/handlers/actions/ceramic/linkProfileNode.ts index d7f186e8..7f5cacc9 100644 --- a/packages/backend/src/handlers/actions/ceramic/linkProfileNode.ts +++ b/packages/backend/src/handlers/actions/ceramic/linkProfileNode.ts @@ -14,7 +14,8 @@ export default async (req: Request, res: Response): Promise => { const role = sessionVariables['x-hasura-role']; const playerId = sessionVariables['x-hasura-user-id']; - + console.debug('role', role); + console.debug('playerId', playerId); const { player_by_pk: player } = await client.GetPlayer({ playerId }); const { ceramicProfileId, ethereumAddress } = player ?? {}; @@ -27,14 +28,14 @@ export default async (req: Request, res: Response): Promise => { } const { nodeId } = input as Mutation_RootLinkCeramicProfileNodeArgs; - + console.debug(input); if (ceramicProfileId === nodeId) { res.json({ verified: true, }); return; } - + console.debug('ceramic URL', CONFIG.ceramicURL); const composeDBClient = new ComposeClient({ ceramic: CONFIG.ceramicURL, definition: composeDBDefinition, @@ -70,6 +71,10 @@ export default async (req: Request, res: Response): Promise => { verified: false, } as LinkCeramicProfileNodeResponse); } catch (error) { + console.error( + 'An unexpected error occurred while linking a ceramic documentID to a player:', + ); + console.error(error); res.json({ verified: false, error: (error as Error).message,