Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ def build(self, resource_key, logger):
pipeline_settings = {
"resource_key": resource_key,
"javascript_builder_settings": javascript_builder_settings,
# Set to True so a device-detection failure degrades gracefully instead of
# returning a 500 for every request. Use False while developing to surface
# mistakes loudly. Errors are still recorded on flowdata.errors / the logger.
"suppress_process_exceptions": True,
}
# If a cloud endpoint is set in the environment, point the pipeline at it.
cloud_endpoint = ExampleUtils.get_cloud_endpoint()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def build(self, resource_key, logger):
# header use the SetHeaderBrowserAccept-CH property.
pipeline_settings = {
"resource_key": resource_key,
# Set to True so a device-detection failure degrades gracefully instead of
# returning a 500 for every request. Use False while developing to surface
# mistakes loudly. Errors are still recorded on flowdata.errors / the logger.
"suppress_process_exceptions": True,
}
# If a cloud endpoint is set in the environment, point the pipeline at it.
cloud_endpoint = ExampleUtils.get_cloud_endpoint()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ class GettingStartedWeb():
def build(self, config, logger):
# Here we add some callback settings for the page to make a request with extra evidence from the client side, in this case the Flask /json route we will make below

# 'suppress_process_exceptions' is set to True in config.json
# (PipelineOptions.BuildParameters) so a device-detection failure degrades
# gracefully instead of returning a 500 for every request. Use False while
# developing to surface mistakes loudly.
GettingStartedWeb.pipeline = PipelineBuilder().add_logger(logger).build_from_configuration(config)
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
"header_blacklist": []
}
}
]
],
"BuildParameters": {
"suppress_process_exceptions": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ class UserAgentClientHintsWeb():
app = Flask(__name__)

def build(self, config, logger):
# 'suppress_process_exceptions' is set to True in config.json
# (PipelineOptions.BuildParameters) so a device-detection failure degrades
# gracefully instead of returning a 500 for every request. Use False while
# developing to surface mistakes loudly.
UserAgentClientHintsWeb.pipeline = PipelineBuilder().add_logger(logger).build_from_configuration(config)
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
"header_blacklist": []
}
}
]
],
"BuildParameters": {
"suppress_process_exceptions": true
}
}
}
Loading