You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
recyclarr/src/Recyclarr.TrashLib/Settings/SettingsContextualMessages.cs

22 lines
648 B

using YamlDotNet.Core;
namespace Recyclarr.TrashLib.Settings;
public static class SettingsContextualMessages
{
public static string? GetContextualErrorFromException(YamlException e)
{
if (e.Message.Contains(
"Property 'repository' not found on type " +
$"'{typeof(SettingsValues).FullName}'"))
{
return
"Usage of 'repository' setting is no " +
"longer supported. Use 'trash_guides' under 'repositories' instead." +
"See: https://recyclarr.dev/wiki/upgrade-guide/v5.0/#settings-repository-changes";
}
return null;
}
}