Merge pull request #231 from Moonlight-Panel/AdditionalDnsErrorHandling
Added additional dns error handling
This commit is contained in:
@@ -183,6 +183,8 @@ public class DomainService
|
||||
if (!ConfigService.Get().Moonlight.Domains.Enable)
|
||||
throw new DisplayException("This operation is disabled");
|
||||
|
||||
try
|
||||
{
|
||||
var domain = EnsureData(d);
|
||||
|
||||
var rname = $"{domain.Name}.{domain.SharedDomain.Name}";
|
||||
@@ -236,6 +238,15 @@ public class DomainService
|
||||
Name = name
|
||||
}));
|
||||
}
|
||||
}
|
||||
catch (OverflowException)
|
||||
{
|
||||
throw new DisplayException("Invalid dns record values");
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
throw new DisplayException("Invalid dns record values");
|
||||
}
|
||||
|
||||
//TODO: AuditLog
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user