Skip to content

Commit

Permalink
Minor spelling fix in the RedirectsService exceptions (#272)
Browse files Browse the repository at this point in the history
Co-authored-by: Erwin Damsma <erwindamsma@tres.nl>
  • Loading branch information
erwindamsma and Erwin Damsma authored Jun 9, 2024
1 parent e4d062b commit 2117b48
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ public void Save(Redirect redirect)
if (existingRedirects.Length > 0)
{
if (existingRedirects.Any(it => it.Domain is null && string.IsNullOrWhiteSpace(it.CustomDomain)))
throw new ArgumentException($"An redirect already exists for {oldUrl}");
throw new ArgumentException($"A redirect already exists for {oldUrl}");

if (redirect.Domain != null && existingRedirects.Any(it => it.Domain?.Id == redirect.Domain.Id))
throw new ArgumentException($"An redirect already exists for {oldUrl}");
throw new ArgumentException($"A redirect already exists for {oldUrl}");

if (!string.IsNullOrWhiteSpace(redirect.CustomDomain) && existingRedirects.Any(it => !string.IsNullOrWhiteSpace(it.CustomDomain) && it.CustomDomain.Equals(redirect.CustomDomain)))
throw new ArgumentException($"An redirect already exists for {oldUrl}");
throw new ArgumentException($"A redirect already exists for {oldUrl}");
}

redirect.OldUrl = oldUrl;
Expand Down

0 comments on commit 2117b48

Please sign in to comment.