diff --git a/src/index.py b/src/index.py index 30cb604..b46b453 100644 --- a/src/index.py +++ b/src/index.py @@ -90,6 +90,24 @@ async def main(): if missing_vars: missing_keys = ', '.join(missing_vars) await notify_error(f"Missing required environment variables: {missing_keys}\n") + print("####################### Invalid credentials issue #############################") + print("Snorkell.ai auto-heals itself when keys are not present.") + print("You just need to rerun the action") + print("If it still doesn't fix the issue, please follow the below steps:") + print("1. Copy the API key from the Snorkell dashboard - https://dashboard.snorkell.ai/snorkell-api-keys") + print("2. Then go to your repository Settings -> Secrets & Variables -> Actions -> New repository secret") + print("3. Create a new secret with the name SNORKELL_API_KEY") + print("4. Paste the API key in the value field") + print("5. Now create a new key with the name SNORKELL_CLIENT_ID") + print("6. Value for SNORKELL_CLIENT_ID is the installation id of the app.") + print("7. Visit this link - https://github.com/apps/snorkell-ai") + print("8. Click Install/Configure.") + print("9. You will get the installation id in the URL.") + print("10. Paste the installation id in the value field") + print("11. Rerun the action") + print("If the issue still persists, please reach out to us at founders@snorkell.ai") + print("We will immediately help you out.") + print("################################################################################") raise ValueError( f"Missing required environment variables: {', '.join(missing_vars)}.\ \nPlease check the action's documentation['https://docs.snorkell.ai/'] for more information.\ @@ -132,14 +150,19 @@ async def main(): print(f"An error occurred: {e}") traceback.print_exc() if "Could not validate credentials" in traceback.format_exc(): - print("Invalid credentials") - print("To fix it") - print("Copy the API key from the Snorkell dashboard - https://dashboard.snorkell.ai/snorkell-api-keys") - print("Then go to your repository Settings -> Secrets & Variables -> Actions -> New repository secret") - print("Create a new secret with the name SNORKELL_API_KEY") - print("Paste the API key in the value field") - print("Rerun the action") - + print("####################### Invalid credentials issue #############################") + print("Snorkell.ai auto-heals itself when the credentials are invalid.") + print("You just need to rerun the action") + print("If it still doesn't fix the issue, please follow the below steps:") + print("1. Copy the API key from the Snorkell dashboard - https://dashboard.snorkell.ai/snorkell-api-keys") + print("2. Then go to your repository Settings -> Secrets & Variables -> Actions -> New repository secret") + print("3. Create a new secret with the name SNORKELL_API_KEY") + print("4. Paste the API key in the value field") + print("5. Rerun the action") + print("If the issue still persists, please reach out to us at founders@snorkell.ai") + print("We will immediately help you out.") + print("################################################################################") + await notify_error(f"An error occurred: "+traceback.format_exc()) raise e