1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

fixed error raising issue

This commit is contained in:
checktheroads
2019-05-14 12:03:58 -07:00
parent 3bd2fc903e
commit d86f1bf6f4
3 changed files with 11 additions and 9 deletions

View File

@@ -160,11 +160,9 @@ def lg():
else:
logger.info(f"Cache match for: {cache_key}, returning cached entry...")
try:
return Response(cache.get(cache_key), value_code)
return Response(cache.get(cache_key))
except:
id = 4152
raise RuntimeError(
id + ":\s" + "Unable to return cached output.", 415, *value_params
)
raise
# Upon exception, render generic error
return Response(errorGeneral(id))
log.error(f"Error returning cached entry for: {cache_key}")
return Response(errorGeneral(4152))