FrameworkWebServer: Extract response translation to new function