The SDK automatically retries failed requests on server errors, rate limits, and network errors using exponential backoff.Configure retries globally or per request:
// Global — set when creating the clientconst client = new UQPayClient({ // ... maxRetries: 3,})// Per request — overrides the global settingawait client.account.accounts.retrieve('acc-123', { maxRetries: 0 })
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"UQPAY Developer Docs","colors":{"primary":"#1A56DB","light":"#3B82F6","dark":"#1E40AF"},"logo":{"light":"https://mintcdn.com/uqpay-0838527a/rZlKu7hECD-xE9ye/images/logo-light.png?fit=max\u0026auto=format\u0026n=rZlKu7hECD-xE9ye\u0026q=85\u0026s=865609daaed49c00096d081e6f7852b3","dark":"https://mintcdn.com/uqpay-0838527a/rZlKu7hECD-xE9ye/images/logo-dark.png?fit=max\u0026auto=format\u0026n=rZlKu7hECD-xE9ye\u0026q=85\u0026s=5d7854dbcd3024ae9bba7e796f18f416","href":"/"},"favicon":"https://mintcdn.com/uqpay-0838527a/rZlKu7hECD-xE9ye/images/favicon.png?fit=max\u0026auto=format\u0026n=rZlKu7hECD-xE9ye\u0026q=85\u0026s=98360fff849e0660f1cdf4b21a0700ad","contextual":{"options":["cursor","vscode","mcp","add-mcp"],"display":"header"},"variables":{"sdk-release-line":"3.1","sdk-node-current":"3.1.0","sdk-python-current":"3.1.0","sdk-go-current":"3.1.0","sdk-java-current":"3.1.0","sdk-cli-current":"3.1.0"},"styling":{"latex":true},"navigation":{"languages":[{"language":"en","default":true,"navbar":{"links":[{"href":"/changelog","label":"Changelog"}]},"href":"account-center/v1.6/guide/overview"},{"language":"zh","navbar":{"links":[{"href":"/zh/changelog","label":"更新日志"}]},"href":"zh/account-center/v1.6/guide/overview"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"uqpay-0838527a","hasAudioNarration":false,"actualSubdomain":"uqpay-0838527a","customDomains":["developers.uqpay.com"],"gitSource":{"type":"github","owner":"uqpay","repo":"uqpay-docs","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad62661a4240b47121ad28f","collectionId":"10badbc4-e8dd-4b43-8f40-3a4673e78ef1","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad62661a4240b47121ad28f"},"entitlements":{},"buildId":"6ad62661a4240b47121ad28f","clientVersion":"0.0.3908","searchFilterCounts":[{"language":"en","tag":"API Reference","count":136},{"language":"zh","tag":"API 参考","count":136},{"language":"en","tag":"Guide","count":94},{"language":"zh","tag":"指南","count":94},{"language":"en","tag":"Card Issuance","count":78},{"language":"zh","tag":"Card Issuance","count":78},{"language":"en","tag":"Stablecoin Account","count":70},{"language":"zh","tag":"Stablecoin Account","count":66},{"language":"en","tag":"Global Account","count":52},{"language":"zh","tag":"Global Account","count":52},{"language":"en","tag":"AI Knowledge Base","count":47},{"language":"en","tag":"Global Acquiring","count":47},{"language":"zh","tag":"AI 知识库","count":47},{"language":"zh","tag":"Global Acquiring","count":47},{"language":"en","tag":"Webhooks","count":40},{"language":"zh","tag":"Webhooks","count":40},{"language":"en","tag":"Account Center","count":38},{"language":"zh","tag":"Account Center","count":38},{"language":"en","tag":"Card Issuance API","count":37},{"language":"zh","tag":"Card Issuance API","count":37}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-branches-v2-autocommit","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-branches-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"teamspace","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"client-snapshot-docs-config","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"#assistant-entry,#assistant-entry-mobile,#chat-assistant-sheet{display:none!important}[data-component-part=products-selector-item]:has(svg[style*=sparkles]),[data-component-part=products-selector-trigger]:has(svg[style*=sparkles]){display:none!important}.landing-page{margin:-1.5rem -1.5rem 0}.landing-hero{padding:5rem 1.5rem 4rem;position:relative;border-bottom:1px solid #e5e7eb}.landing-badge{display:inline-block;padding:.3rem .85rem;background:#eff6ff;border:1px solid #bfdbfe;border-radius:100px;color:#1d4ed8;font-size:.8rem;font-weight:500;letter-spacing:.01em;margin-bottom:1.5rem}.landing-quickstart{margin-top:-2rem;position:relative;z-index:10;padding-bottom:1rem}.landing-steps-container{background:#fff;border-radius:1rem;box-shadow:0 4px 24px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.03);border:1px solid #e5e7eb;overflow:hidden}.landing-step{display:flex;align-items:center;gap:1rem;padding:1.25rem 1.5rem;text-decoration:none;transition:background .15s ease;border-right:1px solid #f0f0f0}.landing-step:last-child{border-right:none}.landing-step:hover{background:#f8fafc;text-decoration:none}.landing-step-number{display:flex;align-items:center;justify-content:center;min-width:2.25rem;height:2.25rem;background:#1a56db;color:#fff;font-weight:700;font-size:.85rem;border-radius:.5rem}.landing-step-title{display:block;font-weight:600;font-size:.9rem;color:#111827}.landing-step-desc{display:block;font-size:.8rem;color:#6b7280;margin-top:.1rem}.landing-devtools{background:#f8fafc;border-radius:1.5rem;margin:0 1rem 2rem}.landing-page [class*=Card]{transition:transform .2s ease,box-shadow .2s ease}.landing-page [class*=Card]:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.06)}.dark .landing-hero{border-bottom-color:#1f2937}.dark .landing-badge{background:rgba(29,78,216,.15);border-color:rgba(59,130,246,.3);color:#60a5fa}.dark .landing-steps-container{background:#1f2937;border-color:#374151;box-shadow:0 4px 24px rgba(0,0,0,.3)}.dark .landing-step{border-right-color:#374151}.dark .landing-step:hover{background:#263244}.dark .landing-step-number{background:#2563eb}.dark .landing-step-title{color:#f3f4f6}.dark .landing-step-desc{color:#9ca3af}.dark .landing-devtools{background:#111827}@media (max-width:768px){.landing-step{border-right:none;border-bottom:1px solid #f0f0f0}.landing-step:last-child{border-bottom:none}.dark .landing-step{border-bottom-color:#374151}}@media (min-width:900px){#error-code-table{width:100%!important;min-width:0!important;table-layout:fixed}#error-code-table td,#error-code-table th{min-width:0!important;padding-left:.75rem;padding-right:.75rem;vertical-align:top;overflow-wrap:anywhere}#error-code-table th:nth-child(1){width:20%}#error-code-table th:nth-child(2){width:28%}#error-code-table th:nth-child(3){width:23%}#error-code-table th:nth-child(4){width:29%}#error-code-table code.mint-whitespace-nowrap,#error-code-table code.whitespace-nowrap{display:inline-block;max-width:100%;white-space:normal!important;overflow-wrap:anywhere;word-break:break-word}}"}],"page":{"pagePath":"developer-tools/sdk/nodejs/error-handling","slug":"/developer-tools/sdk/nodejs/error-handling","pageMetadata":{"title":"Error handling","description":"Handle API errors, configure retries, and understand error types in the UQPAY Node.js SDK.","href":"/developer-tools/sdk/nodejs/error-handling"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Handle API errors, configure retries, and understand error types in the UQPAY Node.js SDK.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`error-types`,children:`Error types`}),`\n`,_jsxs(_components.p,{children:[`All API errors throw typed error classes that extend `,_jsx(_components.code,{children:`UQPayError`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` AuthenticationError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ValidationError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` NotFoundError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` RateLimitError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ServerError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` NetworkError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SimulatorNotAvailableError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@uqpay/sdk'`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Each error exposes the following fields:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Human-readable error message`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`httpStatus`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsx(_components.td,{children:`HTTP status code`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`API error type string`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`code`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`API error code`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`catch-errors`,children:`Catch errors`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` account`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`account`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`accounts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`retrieve`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'acc-123'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` instanceof`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` NotFoundError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Account not found'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` instanceof`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ValidationError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bad request:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` instanceof`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` RateLimitError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Rate limited, will retry automatically'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` instanceof`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` NetworkError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Network error:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` instanceof`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` SimulatorNotAvailableError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Simulator is only available in sandbox'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`retries`,children:`Retries`}),`\n`,_jsx(_components.p,{children:`The SDK automatically retries failed requests on server errors, rate limits, and network errors using exponential backoff.`}),`\n`,_jsx(_components.p,{children:`Configure retries globally or per request:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Global — set when creating the client`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UQPayClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Per request — overrides the global setting`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`account`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`accounts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`retrieve`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'acc-123'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`maxRetries:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})]}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Error handling","description":"Handle API errors, configure retries, and understand error types in the UQPAY Node.js SDK.","href":"/developer-tools/sdk/nodejs/error-handling"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Error types","slug":"error-types","depth":2,"children":[]},{"title":"Catch errors","slug":"catch-errors","depth":2,"children":[]},{"title":"Retries","slug":"retries","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/uqpay-0838527a/77dcf16d44608ed8/error-code-table.js"],"subdomain":"uqpay-0838527a","siteName":"UQPAY Developer Docs","title":"Error handling - UQPAY Developer Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/developer-tools/sdk/nodejs/error-handling","matchLevel":0},"zh":{"href":"/zh/developer-tools/sdk/nodejs/error-handling","matchLevel":1}}},"lastModified":"2026-04-10T06:53:15.887Z","originalFileLocation":"developer-tools/sdk/nodejs/error-handling.md","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Handle API errors, configure retries, and understand error types in the UQPAY Node.js SDK.\">\u003cmeta data-mint-head name=\"application-name\" content=\"UQPAY Developer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/uqpay-0838527a/Ph9kZIAYh4Hg6oMI/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/uqpay-0838527a/Ph9kZIAYh4Hg6oMI/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/uqpay-0838527a/Ph9kZIAYh4Hg6oMI/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/uqpay-0838527a/Ph9kZIAYh4Hg6oMI/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/uqpay-0838527a/Ph9kZIAYh4Hg6oMI/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/uqpay-0838527a/Ph9kZIAYh4Hg6oMI/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/uqpay-0838527a/Ph9kZIAYh4Hg6oMI/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/uqpay-0838527a/Ph9kZIAYh4Hg6oMI/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/uqpay-0838527a/Ph9kZIAYh4Hg6oMI/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Error handling - UQPAY Developer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Handle API errors, configure retries, and understand error types in the UQPAY Node.js SDK.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"UQPAY Developer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Error handling - UQPAY Developer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Handle API errors, configure retries, and understand error types in the UQPAY Node.js SDK.\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/uqpay-0838527a/Ph9kZIAYh4Hg6oMI/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"UQPAY Developer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1A56DB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/developer-tools/sdk/nodejs/error-handling.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://developers.uqpay.com/zh/developer-tools/sdk/nodejs/error-handling\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.uqpay.com/#organization\",\"name\":\"UQPAY Developer Docs\",\"url\":\"https://developers.uqpay.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/uqpay-0838527a/rZlKu7hECD-xE9ye/images/logo-light.png?fit=max\u0026auto=format\u0026n=rZlKu7hECD-xE9ye\u0026q=85\u0026s=865609daaed49c00096d081e6f7852b3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.uqpay.com#website\",\"name\":\"UQPAY Developer Docs\",\"url\":\"https://developers.uqpay.com\",\"publisher\":{\"@id\":\"https://developers.uqpay.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling#webpage\",\"url\":\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling\",\"name\":\"Error handling\",\"description\":\"Handle API errors, configure retries, and understand error types in the UQPAY Node.js SDK.\",\"dateModified\":\"2026-04-10T06:53:15.887Z\",\"isPartOf\":{\"@id\":\"https://developers.uqpay.com#website\"},\"breadcrumb\":{\"@id\":\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SDKs\",\"item\":\"https://developers.uqpay.com/developer-tools/sdk/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Node.js\",\"item\":\"https://developers.uqpay.com/developer-tools/sdk/nodejs/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Error handling\",\"item\":\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling#article\",\"headline\":\"Error handling\",\"name\":\"Error handling\",\"description\":\"Handle API errors, configure retries, and understand error types in the UQPAY Node.js SDK.\",\"url\":\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling\",\"mainEntityOfPage\":{\"@id\":\"https://developers.uqpay.com/developer-tools/sdk/nodejs/error-handling#webpage\"},\"dateModified\":\"2026-04-10T06:53:15.887Z\",\"publisher\":{\"@id\":\"https://developers.uqpay.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.uqpay.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"UQPAY Developer Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"UQPAY Developer Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"navbar":{"links":[{"href":"/changelog","label":"Changelog"}]},"products":[{"product":"Account Center","icon":"user","pages":[{"title":"Account Center","href":"/account-center/v1.6/guide/overview"}]},{"product":"Global Acquiring","icon":"cash-register","pages":[{"title":"Global Acquiring","href":"/global-acquiring/v1.6/guide/overview"}]},{"product":"Global Account","icon":"building-columns","pages":[{"title":"Global Account","href":"/global-account/v1.6/guide/overview"}]},{"product":"Card Issuance","icon":"credit-card","pages":[{"title":"Card Issuance","href":"/card-issuance/v1.6/guide/overview"}]},{"product":"Stablecoin Account","icon":"arrow-right-arrow-left","pages":[{"title":"Stablecoin Account","href":"/stablecoin-account/v1.6/guide/overview"}]},{"product":"Developer Tools","icon":"code","groups":[{"group":"MCP","pages":[{"title":"MCP Integration Guide","href":"/developer-tools/mcp/mcp-integration-guide"}]},{"group":"CLI","pages":[{"title":"CLI","href":"/developer-tools/cli/overview"},{"title":"Command syntax","href":"/developer-tools/cli/commands"}]},{"group":"SDKs","pages":[{"title":"SDK overview","href":"/developer-tools/sdk/overview"},{"title":"Client releases","href":"/developer-tools/client-releases"},{"group":"Node.js","pages":[{"title":"Node.js SDK","href":"/developer-tools/sdk/nodejs/overview"},{"title":"Resources","href":"/developer-tools/sdk/nodejs/resources"},{"title":"Webhooks","href":"/developer-tools/sdk/nodejs/webhooks"},{"title":"Authorization decision","description":"Handle real-time card transaction authorization decisions with PGP encryption using the UQPAY Node.js SDK.","href":"/developer-tools/sdk/nodejs/authorization-decision"},{"title":"Error handling","href":"/developer-tools/sdk/nodejs/error-handling"}]},{"group":"Python","pages":[{"title":"Python SDK","description":"Install and configure the official UQPAY Python SDK.","href":"/developer-tools/sdk/python/overview"},{"title":"Resources","href":"/developer-tools/sdk/python/resources"},{"title":"Webhooks","href":"/developer-tools/sdk/python/webhooks"},{"title":"Authorization decision","href":"/developer-tools/sdk/python/authorization-decision"},{"title":"Error handling","href":"/developer-tools/sdk/python/error-handling"}]},{"group":"Java","pages":[{"title":"Java SDK","href":"/developer-tools/sdk/java/overview"},{"title":"Resources","href":"/developer-tools/sdk/java/resources"}]},{"group":"Go","pages":[{"title":"Go SDK","href":"/developer-tools/sdk/go/overview"},{"title":"Resources","href":"/developer-tools/sdk/go/resources"},{"title":"Webhooks","href":"/developer-tools/sdk/go/webhooks"}]}]}]},{"product":"AI Knowledge Base","icon":"sparkles","pages":[{"title":"AI Knowledge Base","href":"/ai-knowledge-base/card-issuing/corpus_overview"}]}]},{"language":"zh","navbar":{"links":[{"href":"/zh/changelog","label":"更新日志"}]},"pages":[{"title":"zh","href":"/zh/developer-tools/sdk/nodejs/error-handling"}]}]},"title":"Error handling - UQPAY Developer Docs","buildId":"dpl_CUnGQP1HgFUzoxatVC37y4zP83Vx","deploymentId":"dpl_CUnGQP1HgFUzoxatVC37y4zP83Vx","dynamics":[],"chunks":[]}