GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python

Error handler for async functions

Offen
#401 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement P2
Vorherrschende Sprache
Python
Sterne
968
Forks
128
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hello!

The README shows a [error handler](https://github.com/GoogleCloudPlatform/functions-framework-python/blob/a07b1e4f81d84424189488022e5f3d59c06014cc/examples/cloud_run_async/README.md) for the standard functions framework.

```py
import functions_framework

@functions_framework.errorhandler(ZeroDivisionError)
def handle_zero_division(e):
return "I'm a teapot", 418

def function(request):
1 / 0
return "Success", 200
```

Is there something similar available for the newer [async functions](https://github.com/GoogleCloudPlatform/functions-framework-python/blob/a07b1e4f81d84424189488022e5f3d59c06014cc/examples/cloud_run_async/README.md)?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.