Learn about common error patterns in NEAR protocol integrations and how to handle and troubleshoot issues in your applications.
Transaction submission can fail before execution, and accepted transactions can fail while their receipts execute. A timeout leaves the transaction’s outcome unknown; recover using its original hash before submitting a replacement.
Handling Transaction Errors
For SDK error handling, nonce errors, and timeout recovery, see submission errors and retries. The transaction RPC reference documents submission and status responses.Actions within one receipt are atomic; separate receipts are not rolled back together. Inspect finalized receipt outcomes and account for successful movements, fees, and refunds before retrying an operation.
Avoiding Token Loss
This document provides an overview of potential scenarios that can lead to token loss on the NEAR Protocol and how to mitigate these risks. It covers improper key management, refunding deleted accounts, failed asynchronous function calls, and deleting gas keys or accounts that hold gas key balances.Token loss is possible under multiple scenarios. These scenarios can be grouped into a few related classes:
Never use DeleteAccount as a replacement for Transfer. Follow the safe account deletion procedure: transfer, wait for finalized success and outstanding refunds, then delete if needed.
When designing a smart contract, you should always consider the asynchronous nature of NEAR Protocol.
If a contract function f1 calls two (or more) other functions f2 and f3, and at least one of these functions, f2 and f3 fails, then tokens will be refunded from the function that failed, but tokens will be appropriately credited to the function(s) which succeed.These are separate receipts, not an atomic batch of actions in one receipt. A failed downstream call does not undo a previously successful transfer. Track each movement and refund before deciding whether recovery is needed.
Deleting gas keys, or accounts that hold gas key balances
Only the account balance goes to the beneficiary. NEAR held in a gas key is burned when you delete that gas key or the account.
A DeleteKey action fails with GasKeyBalanceTooHigh if the gas key it deletes holds more than 1 NEAR.
A DeleteAccount action fails with GasKeyBalanceTooHigh if all gas keys on the account hold more than 1 NEAR in total, even when each key holds less than 1 NEAR.
Balances at or below these limits are burned, not paid out. Withdraw every gas key balance with WithdrawFromGasKey before you delete a gas key or the account.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"NEAR Docs","colors":{"primary":"#1fb858","light":"#1fb858","dark":"#1fb858"},"logo":{"light":"https://mintcdn.com/neardocs/qO2GD-gji1aakHqN/assets/logo.svg?fit=max\u0026auto=format\u0026n=qO2GD-gji1aakHqN\u0026q=85\u0026s=fe9551b1c3085e39a97965b2886dad4a","dark":"https://mintcdn.com/neardocs/qO2GD-gji1aakHqN/assets/logo_rev.svg?fit=max\u0026auto=format\u0026n=qO2GD-gji1aakHqN\u0026q=85\u0026s=1455d1ccc3385495e8b52e6657ce8c84"},"favicon":"https://mintcdn.com/neardocs/qO2GD-gji1aakHqN/assets/favicon.svg?fit=max\u0026auto=format\u0026n=qO2GD-gji1aakHqN\u0026q=85\u0026s=ef64e8324f93ca4f703d8ebad5e32c53","api":{"openapi":"openapi.json","playground":{"display":"interactive"},"examples":{"defaults":"all","languages":["bash","javascript","python"]}},"appearance":{"default":"system","strict":false},"navbar":{"links":[{"icon":"wallet","href":"https://wallet.near.org/","label":"Wallets"},{"icon":"search","href":"https://explorer.near.org/","label":"Explorers"},{"icon":"layout-grid","href":"https://nearcatalog.xyz/","label":"NEAR Catalog"}]},"search":{"prompt":"Search docs..."},"seo":{"metatags":{"google-site-verification":"x36GvqeIYFjDAl2NNFM-83XykcMYMLRY6f9lgUZbDpA"}},"fonts":{"family":"Inter"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":true},"integrations":{"ga4":{"measurementId":"G-TMG0M3DPNW"}},"contextual":{"options":["copy","claude","cursor"],"display":"header"},"interaction":{"drilldown":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"neardocs","hasAudioNarration":false,"actualSubdomain":"neardocs","customDomains":["docs.near.org"],"gitSource":{"type":"github","owner":"near","repo":"docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6af3b20d6681b4f2e5fc1450","clientVersion":"0.0.4205","searchFilterCounts":[{"language":"default","tag":"RPC","count":46},{"language":"default","tag":"Smart Contracts","count":42},{"language":"default","tag":"Protocol","count":30},{"language":"default","tag":"Building Smart Contracts","count":30},{"language":"default","tag":"Tokens \u0026 Primitives","count":21},{"language":"default","tag":"Concepts","count":19},{"language":"default","tag":"Tutorials","count":18},{"language":"default","tag":"Home","count":17},{"language":"default","tag":"Multi-Chain","count":15},{"language":"default","tag":"Web3 Apps","count":14}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"support-platform-pylon-zendesk","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":"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":"editor-version-history-v2","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":"full-page-search","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":"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":"workos-sso-scim","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},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":".home-code code{max-height:300px;overflow-y:auto}.github-source-link{display:flex;justify-content:flex-end;margin-top:-1rem;margin-bottom:1.25rem;font-size:0.75rem;line-height:1rem}.github-source-link>p,.github-source-link>[data-as=\"p\"]{margin:0}.github-source-link a{display:inline-flex;align-items:center;gap:0.375rem;color:#656d76;border-bottom:0;text-decoration:none}.github-source-link a::before{content:\"\";display:inline-block;width:0.875rem;height:0.875rem;flex-shrink:0;background-color:currentColor;mask:url(\"/assets/github.svg\") center / contain no-repeat;-webkit-mask:url(\"/assets/github.svg\") center / contain no-repeat}.github-source-link a:hover{text-decoration:underline}.dark .github-source-link a{color:#8b949e}"}],"page":{"pagePath":"integrations/errors/introduction","slug":"/integrations/errors/introduction","pageMetadata":{"id":"introduction","title":"Error Handling","sidebarTitle":"Error Handling","description":"Learn about common error patterns in NEAR protocol integrations and how to handle and troubleshoot issues in your applications.","href":"/integrations/errors/introduction"},"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: \"Learn about common error patterns in NEAR protocol integrations and how to handle and troubleshoot issues in your applications.\"\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={a:`a`,code:`code`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Transaction submission can fail before execution, and accepted transactions can fail while their receipts execute. A timeout leaves the transaction’s outcome unknown; recover using its original hash before submitting a replacement.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`near-platform-errors`,children:`Handling Transaction Errors`}),`\n`,_jsxs(_components.p,{children:[`For SDK error handling, nonce errors, and timeout recovery, see `,_jsx(_components.a,{href:`/integrations/create-transactions#submission-errors-and-retries`,children:`submission errors and retries`}),`. The `,_jsx(_components.a,{href:`/api/rpc/transactions`,children:`transaction RPC reference`}),` documents submission and status responses.`]}),`\n`,_jsx(_components.p,{children:`Actions within one receipt are atomic; separate receipts are not rolled back together. Inspect finalized receipt outcomes and account for successful movements, fees, and refunds before retrying an operation.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`avoiding-token-loss`,children:`Avoiding Token Loss`}),`\n`,_jsx(_components.p,{children:`This document provides an overview of potential scenarios that can lead to token loss on the NEAR Protocol and how to mitigate these risks. It covers improper key management, refunding deleted accounts, failed asynchronous function calls, and deleting gas keys or accounts that hold gas key balances.`}),`\n`,_jsx(_components.p,{children:`Token loss is possible under multiple scenarios. These scenarios can be grouped into a few related classes:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/integrations/accounts#improper-key-management`,children:`Improper key management`})}),`\n`,_jsx(_components.li,{children:`Refunding deleted accounts`}),`\n`,_jsx(_components.li,{children:`Failed asynchronous function calls`}),`\n`,_jsx(_components.li,{children:`Deleting gas keys, or accounts that hold gas key balances`}),`\n`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Careful! Losing tokens means losing money!`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`refunding-deleted-accounts`,children:`Refunding deleted accounts`}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/protocol/network/token-loss#refunding-deleted-accounts`,children:`refunding deleted accounts`}),` for payout failures and outstanding refunds that can cause token loss.`]}),`\n`,_jsx(Heading,{level:`3`,id:`deleting-account-with-non-existent-beneficiary`,children:`Deleting account with non-existent beneficiary`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Never use `,_jsx(_components.code,{children:`DeleteAccount`}),` as a replacement for `,_jsx(_components.code,{children:`Transfer`}),`. Follow the `,_jsx(_components.a,{href:`/protocol/network/token-loss#deleting-account-with-non-existent-beneficiary`,children:`safe account deletion procedure`}),`: transfer, wait for finalized success and outstanding refunds, then delete if needed.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`account-deleted-before-it-receives-a-refund`,children:`Account deleted before it receives a refund`}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/protocol/network/token-loss#account-deleted-before-it-receives-a-refund`,children:`account deletion with outstanding refunds`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`failed-asynchronous-function-calls`,children:`Failed asynchronous function calls`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`When designing a smart contract, you should always consider the asynchronous nature of NEAR Protocol.`})}),`\n`,_jsxs(_components.p,{children:[`If a contract function `,_jsx(_components.code,{children:`f1`}),` calls two (or more) other functions `,_jsx(_components.code,{children:`f2`}),` and `,_jsx(_components.code,{children:`f3`}),`, and at least one of these functions, `,_jsx(_components.code,{children:`f2`}),` and `,_jsx(_components.code,{children:`f3`}),` fails, then tokens will be refunded from the function that failed, but tokens will be appropriately credited to the function(s) which succeed.`]}),`\n`,_jsx(_components.p,{children:`These are separate receipts, not an atomic batch of actions in one receipt. A failed downstream call does not undo a previously successful transfer. Track each movement and refund before deciding whether recovery is needed.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`deleting-gas-keys-or-accounts-that-hold-gas-key-balances`,children:`Deleting gas keys, or accounts that hold gas key balances`}),`\n`,_jsxs(_components.p,{children:[`Only the account balance goes to the beneficiary. NEAR held in a `,_jsx(_components.a,{href:`/protocol/accounts-contracts/gas-keys`,children:`gas key`}),` is burned when you delete that gas key or the account.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.code,{children:`DeleteKey`}),` action fails with `,_jsx(_components.code,{children:`GasKeyBalanceTooHigh`}),` if the gas key it deletes holds more than 1 NEAR.`]}),`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.code,{children:`DeleteAccount`}),` action fails with `,_jsx(_components.code,{children:`GasKeyBalanceTooHigh`}),` if all gas keys on the account hold more than 1 NEAR in total, even when each key holds less than 1 NEAR.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Balances at or below these limits are burned, not paid out. Withdraw every gas key balance with `,_jsx(_components.code,{children:`WithdrawFromGasKey`}),` before you delete a gas key or the account.`]})]})}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":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"id":"introduction","title":"Error Handling","sidebarTitle":"Error Handling","description":"Learn about common error patterns in NEAR protocol integrations and how to handle and troubleshoot issues in your applications.","href":"/integrations/errors/introduction"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Handling Transaction Errors","slug":"near-platform-errors","depth":2,"children":[]},{"title":"Avoiding Token Loss","slug":"avoiding-token-loss","depth":2,"children":[]},{"title":"Refunding deleted accounts","slug":"refunding-deleted-accounts","depth":2,"children":[{"title":"Deleting account with non-existent beneficiary","slug":"deleting-account-with-non-existent-beneficiary","depth":3,"children":[]},{"title":"Account deleted before it receives a refund","slug":"account-deleted-before-it-receives-a-refund","depth":3,"children":[]}]},{"title":"Failed asynchronous function calls","slug":"failed-asynchronous-function-calls","depth":2,"children":[]},{"title":"Deleting gas keys, or accounts that hold gas key balances","slug":"deleting-gas-keys-or-accounts-that-hold-gas-key-balances","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/neardocs/86bd1b8645a68f87/gleap.js","/_mintlify/custom/neardocs/12aaa8206e84cdb3/scripts/patch-openapi.js"],"subdomain":"neardocs","siteName":"NEAR Docs","title":"Error Handling - NEAR Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T23:15:11.611Z","originalFileLocation":"integrations/errors/introduction.mdx"},"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=\"Learn about common error patterns in NEAR protocol integrations and how to handle and troubleshoot issues in your applications.\">\u003cmeta data-mint-head name=\"application-name\" content=\"NEAR 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/neardocs/jx3X3HW4FX2vbKtn/_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/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_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/neardocs/jx3X3HW4FX2vbKtn/_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/neardocs/jx3X3HW4FX2vbKtn/_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/neardocs/jx3X3HW4FX2vbKtn/_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/neardocs/jx3X3HW4FX2vbKtn/_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/neardocs/jx3X3HW4FX2vbKtn/_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/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Error Handling - NEAR Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn about common error patterns in NEAR protocol integrations and how to handle and troubleshoot issues in your applications.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"NEAR Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.near.org/integrations/errors/introduction\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://neardocs.mintlify.site/_mintlify/api/og/v2?division=Accounts+%26+Transfers\u0026amp;title=Error+Handling\u0026amp;description=Learn+about+common+error+patterns+in+NEAR+protocol+integrations+and+how+to+handle+and+troubleshoot+issues+in+your+applications.\u0026amp;theme=78b8e0f81434755d714312aa\u0026amp;signature=1cfef40ffc45d39546065173f05ebcc6dd75bf1b5e0c7fc5668b536ea5e301e3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Error Handling - NEAR Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn about common error patterns in NEAR protocol integrations and how to handle and troubleshoot issues in your applications.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://neardocs.mintlify.site/_mintlify/api/og/v2?division=Accounts+%26+Transfers\u0026amp;title=Error+Handling\u0026amp;description=Learn+about+common+error+patterns+in+NEAR+protocol+integrations+and+how+to+handle+and+troubleshoot+issues+in+your+applications.\u0026amp;theme=78b8e0f81434755d714312aa\u0026amp;signature=1cfef40ffc45d39546065173f05ebcc6dd75bf1b5e0c7fc5668b536ea5e301e3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/neardocs/jx3X3HW4FX2vbKtn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"NEAR Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1fb858\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"x36GvqeIYFjDAl2NNFM-83XykcMYMLRY6f9lgUZbDpA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.near.org/integrations/errors/introduction\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/integrations/errors/introduction.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.near.org/#organization\",\"name\":\"NEAR Docs\",\"url\":\"https://docs.near.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/neardocs/qO2GD-gji1aakHqN/assets/logo.svg?fit=max\u0026auto=format\u0026n=qO2GD-gji1aakHqN\u0026q=85\u0026s=fe9551b1c3085e39a97965b2886dad4a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.near.org#website\",\"name\":\"NEAR Docs\",\"url\":\"https://docs.near.org\",\"publisher\":{\"@id\":\"https://docs.near.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.near.org/integrations/errors/introduction#webpage\",\"url\":\"https://docs.near.org/integrations/errors/introduction\",\"name\":\"Error Handling\",\"description\":\"Learn about common error patterns in NEAR protocol integrations and how to handle and troubleshoot issues in your applications.\",\"dateModified\":\"2026-11-04T23:15:11.611Z\",\"isPartOf\":{\"@id\":\"https://docs.near.org#website\"},\"breadcrumb\":{\"@id\":\"https://docs.near.org/integrations/errors/introduction#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.near.org/integrations/errors/introduction#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accounts \u0026 Transfers\",\"item\":\"https://docs.near.org/integrations/accounts\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Error Handling\",\"item\":\"https://docs.near.org/integrations/errors/introduction\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.near.org/integrations/errors/introduction#article\",\"headline\":\"Error Handling\",\"name\":\"Error Handling\",\"description\":\"Learn about common error patterns in NEAR protocol integrations and how to handle and troubleshoot issues in your applications.\",\"url\":\"https://docs.near.org/integrations/errors/introduction\",\"mainEntityOfPage\":{\"@id\":\"https://docs.near.org/integrations/errors/introduction#webpage\"},\"dateModified\":\"2026-11-04T23:15:11.611Z\",\"publisher\":{\"@id\":\"https://docs.near.org/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.near.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"NEAR Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"NEAR Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/integrations/errors/introduction.md","siteName":"NEAR Docs","nav":{"global":null,"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":""}]},{"tab":"Protocol","icon":"layers","pages":[{"title":"Protocol","href":"/protocol/network/architecture"}]},{"tab":"Smart Contracts","icon":"file-badge","pages":[{"title":"Smart Contracts","href":"/smart-contracts/what-is"}]},{"tab":"Web3 Apps","icon":"terminal","pages":[{"title":"Web3 Apps","href":"/web3-apps/what-is"}]},{"tab":"Multi-Chain","icon":"link-2","pages":[{"title":"Multi-Chain","href":"/chain-abstraction/what-is"}]},{"tab":"Tokens \u0026 Primitives","icon":"coins","pages":[{"title":"Tokens \u0026 Primitives","href":"/primitives/what-is"}]},{"tab":"Data Infra","icon":"database","pages":[{"title":"Data Infra","href":"/data-infrastructure/what-is"}]},{"tab":"Integrations","icon":"plug","groups":[{"group":" ","pages":[{"title":"Exchange Integration","sidebarTitle":"Overview","href":"/integrations/exchange-integration"}]},{"group":"Protocol","pages":[{"title":"Nodes \u0026 RPC","sidebarTitle":"Nodes \u0026 RPC","href":"/integrations/nodes"},{"title":"Accessing On-chain Data","sidebarTitle":"On-chain Data","href":"/integrations/on-chain-data"},{"title":"Blocks and Finality","sidebarTitle":"Blocks and Finality","href":"/integrations/blocks-and-finality"},{"title":"Transaction Lifecycle","sidebarTitle":"Transaction Lifecycle","href":"/integrations/transaction-lifecycle"},{"title":"Testing an Integration","sidebarTitle":"Testing","href":"/integrations/testing"}]},{"group":"Accounts \u0026 Transfers","pages":[{"title":"Accounts","sidebarTitle":"Accounts","href":"/integrations/accounts"},{"title":"Receiving Deposits","sidebarTitle":"Receiving Deposits","href":"/integrations/deposits"},{"title":"Sending Withdrawals","sidebarTitle":"Sending Withdrawals","href":"/integrations/create-transactions"},{"title":"Balances \u0026 Reconciliation","sidebarTitle":"Balances \u0026 Reconciliation","description":"Learn how to query and track account balances in NEAR protocol, including native NEAR tokens, fungible tokens, and balance management for integrations.","href":"/integrations/balance-changes"},{"title":"Error Handling","sidebarTitle":"Error Handling","href":"/integrations/errors/introduction"}]},{"group":"Tokens \u0026 Staking","pages":[{"title":"Fungible tokens","sidebarTitle":"Fungible Tokens","description":"Integrate NEP-141 fungible tokens, including balance queries, storage registration, transfers, and metadata.","href":"/integrations/fungible-tokens"},{"title":"Staking \u0026 Delegation","sidebarTitle":"Staking \u0026 Delegation","href":"/integrations/staking"}]}]},{"tab":"RPC","icon":"server","pages":[{"title":"RPC","href":"/api/rpc/introduction"}]}]},"basePath":"","title":"Error Handling - NEAR Docs","deploymentId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","buildId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","dynamics":[],"chunks":[]}