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
3 changes: 2 additions & 1 deletion greenwave/listeners/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
TraceContextTextMapPropagator,
)
from requests.exceptions import HTTPError
from werkzeug.exceptions import HTTPException

import greenwave.app_factory
from greenwave.logger import init_logging, log_to_stdout
Expand Down Expand Up @@ -249,7 +250,7 @@ def _old_and_new_decisions(self, submit_time, **request_data):
old_decision = greenwave.decision.make_decision(
request_data, self.app.config
)
except HTTPError as e:
except (HTTPError, HTTPException) as e:
self.app.logger.exception(
"Failed to retrieve decision for data=%s, error: %s", request_data, e
)
Expand Down
9 changes: 9 additions & 0 deletions greenwave/tests/test_listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pytest
import stomp
from requests.exceptions import HTTPError
from werkzeug.exceptions import NotFound

from greenwave.app_factory import create_app
from greenwave.listeners.resultsdb import ResultsDBListener
Expand Down Expand Up @@ -356,6 +357,14 @@ def retrieve_decision(data, _config):
HTTPError(), # type: ignore
{"policies_satisfied": True},
),
(
NotFound(),
{"policies_satisfied": True},
),
(
NotFound(),
NotFound(),
),
),
)
def test_decision_does_not_change(
Expand Down