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