mirror of
https://github.com/nodejs/node.git
synced 2025-08-20 09:25:30 +02:00

PR-URL: https://github.com/nodejs/node/pull/41836 Reviewed-By: Ruy Adorno <ruyadorno@github.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
11 lines
284 B
JavaScript
11 lines
284 B
JavaScript
class NotCachedError extends Error {
|
|
constructor (url) {
|
|
/* eslint-disable-next-line max-len */
|
|
super(`request to ${url} failed: cache mode is 'only-if-cached' but no cached response is available.`)
|
|
this.code = 'ENOTCACHED'
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
NotCachedError,
|
|
}
|