From cb454351d497a4387775f3c9d64114cb8b32c08d Mon Sep 17 00:00:00 2001 From: Ian Bull Date: Wed, 4 Sep 2024 00:23:19 -0700 Subject: refactor(ext): align error messages (#25310) --- ext/cache/01_cache.js | 2 +- ext/cache/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/cache') diff --git a/ext/cache/01_cache.js b/ext/cache/01_cache.js index a5bcde598..269261f40 100644 --- a/ext/cache/01_cache.js +++ b/ext/cache/01_cache.js @@ -105,7 +105,7 @@ class Cache { const reqUrl = new URL(innerRequest.url()); if (reqUrl.protocol !== "http:" && reqUrl.protocol !== "https:") { throw new TypeError( - "Request url protocol must be 'http:' or 'https:'", + `Request url protocol must be 'http:' or 'https:': received '${reqUrl.protocol}'`, ); } if (innerRequest.method !== "GET") { diff --git a/ext/cache/lib.rs b/ext/cache/lib.rs index e399b08e0..f6d758b95 100644 --- a/ext/cache/lib.rs +++ b/ext/cache/lib.rs @@ -211,7 +211,7 @@ where state.put(cache); Ok(state.borrow::().clone()) } else { - Err(type_error("CacheStorage is not available in this context.")) + Err(type_error("CacheStorage is not available in this context")) } } -- cgit v1.2.3