diff --git a/CHANGELOG.md b/CHANGELOG.md index a5d63ae67..35b4b4223 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] ### Fixed - fixed an issues causing static sites in regions other than us-east-1 to redirect to the s3 object until CloudFront was able to use the global endpoint of the bucket +- fixed uncaught static site auth@edge errors in refresh token handling ## [1.13.0] - 2020-09-14 ### Added diff --git a/runway/hooks/staticsite/auth_at_edge/templates/shared.py b/runway/hooks/staticsite/auth_at_edge/templates/shared.py index 20fc63d25..97c71883d 100644 --- a/runway/hooks/staticsite/auth_at_edge/templates/shared.py +++ b/runway/hooks/staticsite/auth_at_edge/templates/shared.py @@ -4,7 +4,6 @@ import logging import re import time -import traceback from datetime import datetime from random import random from urllib import request # pylint: disable=no-name-in-module @@ -304,9 +303,8 @@ def http_post_with_retry(url, data, headers): except Exception as err: LOGGER.error("HTTP POST to %s failed (attempt %s)", url, attempts) LOGGER.error(err) - LOGGER.error(traceback.print_exc()) if attempts >= 5: - break + raise if attempts >= 2: # After attempting twice do some exponential backoff with jitter time.sleep((25 * (pow(2, attempts) + random() * attempts)) / 1000)