File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -188,15 +188,16 @@ def hello_error_1(request):
188
188
189
189
def hello_error_2 (request ):
190
190
# [START functions_helloworld_error]
191
- # WILL NOT be reported to Stackdriver Error Reporting, but will show up
192
- # in logs
191
+ # These errors WILL NOT be reported to Stackdriver
192
+ # Error Reporting, but will show up in logs.
193
193
import logging
194
194
print (RuntimeError ('I failed you (print to stdout)' ))
195
195
logging .warn (RuntimeError ('I failed you (logging.warn)' ))
196
196
logging .error (RuntimeError ('I failed you (logging.error)' ))
197
197
sys .stderr .write ('I failed you (sys.stderr.write)\n ' )
198
198
199
- # This WILL be reported to Stackdriver Error Reporting
199
+ # This is considered a successful execution and WILL NOT be reported to
200
+ # Stackdriver Error Reporting, but the status code (500) WILL be logged.
200
201
from flask import abort
201
202
return abort (500 )
202
203
# [END functions_helloworld_error]
You can’t perform that action at this time.
0 commit comments