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 voetberg committed Apr 15, 2024
1 parent 586bb95 commit 249e66b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/rucio/web/rest/flaskapi/v1/dids.py
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 249e66b

Please sign in to comment.