Skip to content

Commit

Permalink
Rules: Return 404 when DID rules not found. Fixes rucio#6334
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderrichards authored and bari12 committed Dec 18, 2023
1 parent 860c88d commit 1081588
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/rucio/web/rest/flaskapi/v1/dids.py
Original file line number Diff line number Diff line change
Expand Up @@ -1526,6 +1526,7 @@ def get(self, scope_name):
scope, name = parse_scope_name(scope_name, request.environ.get('vo'))

def generate(vo):
get_did(scope=scope, name=name, vo=vo)
for rule in list_replication_rules({'scope': scope, 'name': name}, vo=vo):
yield dumps(rule, cls=APIEncoder) + '\n'

Expand All @@ -1534,6 +1535,8 @@ def generate(vo):
return generate_http_error_flask(400, error)
except RuleNotFound as error:
return generate_http_error_flask(404, error)
except DataIdentifierNotFound as error:
return generate_http_error_flask(404, error)


class BulkMeta(ErrorHandlingMethodView):
Expand Down

0 comments on commit 1081588

Please sign in to comment.