Skip to content
Snippets Groups Projects
Commit 2b85e556 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

save_code_now/origin_save: Capitalize url in exception messages

parent 48c6fd33
No related branches found
No related tags found
1 merge request!1296save_bulk: Add new endpoints to manage bulk archival of origins
......@@ -219,13 +219,13 @@ def _check_origin_url_valid(origin_url: str) -> None:
_validate_url(origin_url)
except ValidationError:
raise BadInputExc(
f"The provided origin url ({escape(origin_url)}) is not valid!"
f"The provided origin URL '{escape(origin_url)}' is not valid!"
)
parsed_url = urlparse(origin_url)
if parsed_url.password not in (None, "", "anonymous", "guest"):
raise BadInputExc(
"The provided origin url contains a password and cannot be "
"The provided origin URL contains a password and cannot be "
"accepted for security reasons."
)
......
......@@ -679,7 +679,7 @@ def test_reject_origin_url_with_password(api_client, swh_scheduler):
assert resp.data == {
"exception": "BadInputExc",
"reason": (
"The provided origin url contains a password and cannot "
"The provided origin URL contains a password and cannot "
"be accepted for security reasons."
),
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment