How to use the pyngrok.exception.PyngrokNgrokError function in pyngrok

To help you get started, we’ve selected a few pyngrok examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Drakkar-Software / OctoBot-Tentacles / Services / Services_bases / webhook_service / webhook_service.py View on Github external
def _start_server(self):
        try:
            self._prepare_webhook_server()
            self._load_webhook_routes()
            self.ngrok_public_url = self.connect(self.webhook_port, protocol="http")
            self.webhook_public_url = f"{self.ngrok_public_url}/webhook"
            if self.webhook_server:
                self.connected = True
                self.webhook_server.serve_forever()
        except PyngrokNgrokError as e:
            self.logger.error(f"Error when starting webhook service: Your ngrock.com token might be invalid. ({e})")
        except Exception as e:
            self.logger.exception(e, True, f"Error when running webhook service: ({e})")
        self.connected = False

pyngrok

A Python wrapper for ngrok.

MIT
Latest version published 4 days ago

Package Health Score

79 / 100
Full package analysis