Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ool-py into main
  • Loading branch information
Michaellh0079 committed Jul 19, 2024
2 parents c2aab04 + 537cd10 commit 600b15a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pylot/plugins/cumulus_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,10 @@ def main(action, target, output=None, **kwargs):

def error_handling(results, api_function, **kwargs):
ret = ''
if isinstance(results, dict) and results.get('error', '') == 'Bad Request':
if 'Member must have length less than or equal to 8192' in results.get('message', ''):
print('Handling 8192 character limit error...')
if results.get('error', '') == 'Bad Request':
error_message = results.get('message', '')
if 'Member must have length less than or equal to 8192' in error_message:
print(f'Handling error: {error_message}')
cli = boto3.client('s3')
stack_prefix = os.getenv('STACK_PREFIX')
if not stack_prefix:
Expand Down Expand Up @@ -207,5 +208,4 @@ def error_handling(results, api_function, **kwargs):
ec.put_targets(Rule=rule_name, Targets=res.get('Targets'))
else:
ret = results
print('Error handling complete')
return ret

0 comments on commit 600b15a

Please sign in to comment.