Пример #1
0
        private static string HumanReadable(RadarrError apiErrors)
        {
            var firstError = apiErrors.Errors.First();
            var details    = string.Join("\n", apiErrors.Errors.Select(error =>
            {
                return($"{error.Title} ({error.Status}, RayId: {error.RayId}), Details: {error.Detail}");
            }));

            return($"Error while calling api: {firstError.Title}\nFull error(s): {details}");
        }
Пример #2
0
 public RadarrAPIException(RadarrError apiError) : base(HumanReadable(apiError))
 {
     APIErrors = apiError;
 }