Files
klz-cables.com/.pnpm-store/v10/files/39/aae649c6a7f9d55065876cd36385006db429348fcd176ece5657547bc31691308a4e4c388cc247472eae09634971333a32403488f88ee146550f9abf00200f
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
1.2 KiB
Plaintext

{"version":3,"sources":["../../src/utilities/isErrorPublic.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\nimport type { SanitizedConfig } from '../config/types.js'\n\ntype PayloadError = {\n isPublic?: boolean\n status?: number\n} & Error\n\n/**\n * Determines if an error should be shown to the user.\n */\nexport function isErrorPublic(error: Error, config: SanitizedConfig) {\n const payloadError = error as PayloadError\n\n if (config.debug) {\n return true\n }\n if (payloadError.isPublic === true) {\n return true\n }\n if (payloadError.isPublic === false) {\n return false\n }\n if (payloadError.status && payloadError.status !== httpStatus.INTERNAL_SERVER_ERROR) {\n return true\n }\n\n return false\n}\n"],"names":["status","httpStatus","isErrorPublic","error","config","payloadError","debug","isPublic","INTERNAL_SERVER_ERROR"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AASlD;;CAEC,GACD,OAAO,SAASC,cAAcC,KAAY,EAAEC,MAAuB;IACjE,MAAMC,eAAeF;IAErB,IAAIC,OAAOE,KAAK,EAAE;QAChB,OAAO;IACT;IACA,IAAID,aAAaE,QAAQ,KAAK,MAAM;QAClC,OAAO;IACT;IACA,IAAIF,aAAaE,QAAQ,KAAK,OAAO;QACnC,OAAO;IACT;IACA,IAAIF,aAAaL,MAAM,IAAIK,aAAaL,MAAM,KAAKC,WAAWO,qBAAqB,EAAE;QACnF,OAAO;IACT;IAEA,OAAO;AACT"}