< Summary - Jellyfin

Information
Class: Jellyfin.Server.Filters.RetryOnTemporarilyUnavailableFilter
Assembly: jellyfin
File(s): /srv/git/jellyfin/Jellyfin.Server/Filters/RetryOnTemporarilyUnavailableFilter.cs
Line coverage
100%
Covered lines: 40
Uncovered lines: 0
Coverable lines: 40
Total lines: 51
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 1/23/2026 - 12:11:06 AM Line coverage: 100% (40/40) Total lines: 512/27/2026 - 12:13:29 AM Line coverage: 100% (40/40) Branch coverage: 50% (1/2) Total lines: 51 2/27/2026 - 12:13:29 AM Line coverage: 100% (40/40) Branch coverage: 50% (1/2) Total lines: 51

Coverage delta

Coverage delta 1 -1

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Apply(...)50%22100%

File(s)

/srv/git/jellyfin/Jellyfin.Server/Filters/RetryOnTemporarilyUnavailableFilter.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using Microsoft.OpenApi;
 3using Swashbuckle.AspNetCore.SwaggerGen;
 4
 5namespace Jellyfin.Server.Filters;
 6
 7internal class RetryOnTemporarilyUnavailableFilter : IOperationFilter
 8{
 9    public void Apply(OpenApiOperation operation, OperationFilterContext context)
 10    {
 36311        operation.Responses?.TryAdd(
 36312            "503",
 36313            new OpenApiResponse
 36314            {
 36315                Description = "The server is currently starting or is temporarily not available.",
 36316                Headers = new Dictionary<string, IOpenApiHeader>
 36317                {
 36318                    {
 36319                        "Retry-After", new OpenApiHeader
 36320                        {
 36321                            AllowEmptyValue = true,
 36322                            Required = false,
 36323                            Description = "A hint for when to retry the operation in full seconds.",
 36324                            Schema = new OpenApiSchema
 36325                            {
 36326                                Type = JsonSchemaType.Integer,
 36327                                Format = "int32"
 36328                            }
 36329                        }
 36330                    },
 36331                    {
 36332                        "Message", new OpenApiHeader
 36333                        {
 36334                            AllowEmptyValue = true,
 36335                            Required = false,
 36336                            Description = "A short plain-text reason why the server is not available.",
 36337                            Schema = new OpenApiSchema
 36338                            {
 36339                                Type = JsonSchemaType.String,
 36340                                Format = "text"
 36341                            }
 36342                        }
 36343                    }
 36344                },
 36345                Content = new Dictionary<string, OpenApiMediaType>()
 36346                {
 36347                    { "text/html", new OpenApiMediaType() }
 36348                }
 36349            });
 36350    }
 51}