UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

33 lines (32 loc) 927 B
import { jsx as m } from "../../external/preact/jsx-runtime/dist/jsxRuntime.module.js"; import { UNDEFINED_ERROR as n, getCommonErrorMessage as a } from "./getCommonErrorCode.js"; import i from "../internal/CopyText/CopyText.js"; const d = (e, t, r) => { if (!e) return n; const o = a(e, r); if (o) return o; switch (e.errorCode) { case void 0: return { title: "somethingWentWrong", message: [t, "tryRefreshingThePageOrComeBackLater"], refreshComponent: !0 }; case "00_500": { const s = r ? "theErrorCodeIs" : "contactSupportForHelpAndShareErrorCode"; return { title: "somethingWentWrong", message: [t, s], translationValues: { [s]: e.requestId ? /* @__PURE__ */ m(i, { textToCopy: e.requestId }) : null }, onContactSupport: r }; } default: return n; } }; export { d as getErrorMessage };