mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2024-12-19 05:07:55 +00:00
correct to show warning in logs, but not error out on mapper exceptions
This commit is contained in:
parent
94b695e907
commit
35bb4b9e4a
@ -28,8 +28,8 @@ def lambda_handler(event, context):
|
||||
result = es.request(body, f"telm-{index}/_doc/_bulk", "POST")
|
||||
if 'errors' in result and result['errors'] == True:
|
||||
error_types = [x['index']['error']['type'] for x in result['items'] if 'error' in x['index']] # get all the error types
|
||||
error_types = [a for a in error_types if a != 'mapper_parsing_exception'] # filter out mapper failures since they will never succeed
|
||||
if error_types:
|
||||
print(event)
|
||||
print(result)
|
||||
error_types = [a for a in error_types if a != 'mapper_parsing_exception'] # filter out mapper failures since they will never succeed
|
||||
if error_types:
|
||||
raise RuntimeError
|
Loading…
Reference in New Issue
Block a user