Skip to content

Commit 11ceb2e

Browse files
fix: DecideBackendByRequester: lookup via get
This will make it easier to check for and deal with lookup failures. The microservice will return a None backend instead of raising an exception, but that's behaviour that's easier to deal with. And if nothing else provides a default backend, SATOSA will raise KeyError: None
1 parent 1ee1696 commit 11ceb2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/satosa/micro_services/custom_routing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def process(self, context, data):
7979
:param context: request context
8080
:param data: the internal request
8181
"""
82-
context.target_backend = self.requester_mapping[data.requester]
82+
context.target_backend = self.requester_mapping.get(data.requester)
8383
return super().process(context, data)
8484

8585

0 commit comments

Comments
 (0)