From 44951dc1fc639037d9569784f4c9e44e0ffe759f Mon Sep 17 00:00:00 2001 From: Marc Cuva Date: Tue, 19 Dec 2023 13:19:02 -0500 Subject: [PATCH] fix: link to docs --- packages/node/src/index.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index 178852fa22..cc01f911f6 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -69,13 +69,15 @@ const readme = ( const getUser: GetUserFunction = async ({ byAPIKey, byEmail, manualAPIKey }) => { if (!byAPIKey && !options.disableMetrics) { - console.error('Missing required definition for byAPIKey'); - console.error('This should be much more useful than it is.'); + console.error( + 'Missing required definition for byAPIKey. Learn more here: https://docs.readme.com/main/docs/unified-snippet-docs#/getuserbyapikey', + ); return next(); } if (!byEmail && !options.disableWebhook) { - console.error('Missing required definition for byEmail'); - console.error('This should be much more useful than it is.'); + console.error( + 'Missing required definition for byEmail. Learn more here: https://docs.readme.com/main/docs/unified-snippet-docs#/getuserbyapikey', + ); return next(); } @@ -97,7 +99,7 @@ const readme = ( requestAPIKey = findAPIKey(req); } catch (e) { console.error( - 'Could not automatically find API key in the request. You should pass the API key via `manualAPIKey` in the getUser function. Learn more here: [link to docs]', + 'Could not automatically find API key in the request. You should pass the API key via `manualAPIKey` in the getUser function. Learn more here: https://docs.readme.com/main/docs/unified-snippet-docs#getuserbyapikey', ); } return byAPIKey(requestAPIKey); @@ -165,7 +167,7 @@ const readme = ( console.error( usingManualAPIKey ? 'The API key you passed in via `manualAPIKey` could not be found in the user object you provided.' - : 'Could not automatically find API key in the request. You should pass the API key via `manualAPIKey` in the getUser function. Learn more here: [link to docs]', + : 'Could not automatically find API key in the request. You should pass the API key via `manualAPIKey` in the getUser function. Learn more here: https://docs.readme.com/main/docs/unified-snippet-docs#/getuserbyapikey', ); return next(); }