diff --git a/core/audits/server-response-time.js b/core/audits/server-response-time.js index 037f4b149fb5..5cf828a6c262 100644 --- a/core/audits/server-response-time.js +++ b/core/audits/server-response-time.js @@ -17,8 +17,6 @@ const UIStrings = { description: 'Keep the server response time for the main document short because all other requests depend on it. [Learn more about the Time to First Byte metric](https://developer.chrome.com/docs/lighthouse/performance/time-to-first-byte/).', /** Used to summarize the total Server Response Time duration for the primary HTML response. The `{timeInMs}` placeholder will be replaced with the time duration, shown in milliseconds (e.g. 210 ms) */ displayValue: `Root document took {timeInMs, number, milliseconds}\xa0ms`, - /** A message displayed in a Lighthouse audit result warning that the server response time could not be determined. */ - missingTimingWarning: 'Missing timing information needed to determine the server response time', }; const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings); @@ -49,7 +47,7 @@ class ServerResponseTime extends Audit { */ static calculateResponseTime(record) { // Lightrider does not have timings for sendEnd, but we do have this timing which should be - // close. + // close to the response time. if (global.isLightrider && record.lrStatistics) return record.lrStatistics.requestMs; if (!record.timing) return null; @@ -69,11 +67,7 @@ class ServerResponseTime extends Audit { const responseTime = ServerResponseTime.calculateResponseTime(mainResource); if (responseTime === null) { - return { - score: 0, - runWarnings: [str_(UIStrings.missingTimingWarning)], - notApplicable: true, - }; + throw new Error('no timing found for main resource'); } const passed = responseTime < TOO_SLOW_THRESHOLD_MS; diff --git a/shared/localization/locales/en-US.json b/shared/localization/locales/en-US.json index ccb07f82b06c..f6ee0981dca8 100644 --- a/shared/localization/locales/en-US.json +++ b/shared/localization/locales/en-US.json @@ -1409,9 +1409,6 @@ "core/audits/server-response-time.js | failureTitle": { "message": "Reduce initial server response time" }, - "core/audits/server-response-time.js | missingTimingWarning": { - "message": "Missing timing information needed to determine the server response time" - }, "core/audits/server-response-time.js | title": { "message": "Initial server response time was short" }, diff --git a/shared/localization/locales/en-XL.json b/shared/localization/locales/en-XL.json index c2e14964dfb7..bafb884358c3 100644 --- a/shared/localization/locales/en-XL.json +++ b/shared/localization/locales/en-XL.json @@ -1409,9 +1409,6 @@ "core/audits/server-response-time.js | failureTitle": { "message": "R̂éd̂úĉé îńît́îál̂ śêŕv̂ér̂ ŕêśp̂ón̂śê t́îḿê" }, - "core/audits/server-response-time.js | missingTimingWarning": { - "message": "M̂íŝśîńĝ t́îḿîńĝ ín̂f́ôŕm̂át̂íôń n̂éêd́êd́ t̂ó d̂ét̂ér̂ḿîńê t́ĥé ŝér̂v́êŕ r̂éŝṕôńŝé t̂ím̂é" - }, "core/audits/server-response-time.js | title": { "message": "Îńît́îál̂ śêŕv̂ér̂ ŕêśp̂ón̂śê t́îḿê ẃâś ŝh́ôŕt̂" },