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.
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.
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, and failed asynchronous function calls.Token loss is possible under multiple scenarios. These scenarios can be grouped into a few related classes:
When a refund receipt is issued for an account, if that account no longer exists, the undeliverable system refund is burned. System refunds require an existing receiving account.
When you delete an account, you must assign a beneficiary. The runtime sends the remaining balance directly to that beneficiary in a system payout receipt. If it cannot be delivered, its amount is burned. Verify that the beneficiary exists and track the payout’s finalized outcome.
If an account is explicitly deleted while refunds are outstanding, those refunds can become undeliverable. Wait for outstanding receipts and refund outcomes before deleting an account.See the runtime refund handling.
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.
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":""},"chroma":{"liveDeploymentHistoryId":"6ae27ddedcbb774f7bf7ff4a","collectionId":"69194167-059d-4bea-8b64-8cf966159305","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae27ddedcbb774f7bf7ff4a"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae27e63eade4fe541436bce","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"RPC","count":46},{"language":"default","tag":"Smart Contracts","count":44},{"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":"Tutorials","count":21},{"language":"default","tag":"Concepts","count":19},{"language":"default","tag":"Home","count":17},{"language":"default","tag":"Multi-Chain","count":15},{"language":"default","tag":"Web3 Apps","count":15}]},"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":"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":"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":"editor-version-history-v2","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":"vite-origin","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":"billing-updated-9-15","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":"workos-enabled","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:.75rem;line-height:1rem}.github-source-link>[data-as=p],.github-source-link>p{margin:0}.github-source-link a{display:inline-flex;align-items:center;gap:.375rem;color:#656d76;border-bottom:0;text-decoration:none}.github-source-link a::before{content:\"\";display:inline-block;width:.875rem;height:.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`,..._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, and failed asynchronous function calls.`}),`\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`]}),`\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`,_jsx(_components.p,{children:`When a refund receipt is issued for an account, if that account no longer exists, the undeliverable system refund is burned. System refunds require an existing receiving account.`}),`\n`,_jsx(Heading,{level:`3`,id:`deleting-account-with-non-existent-beneficiary`,children:`Deleting account with non-existent beneficiary`}),`\n`,_jsx(_components.p,{children:`When you delete an account, you must assign a beneficiary. The runtime sends the remaining balance directly to that beneficiary in a system payout receipt. If it cannot be delivered, its amount is burned. Verify that the beneficiary exists and track the payout’s finalized outcome.`}),`\n`,_jsx(Heading,{level:`3`,id:`account-deleted-before-it-receives-a-refund`,children:`Account deleted before it receives a refund`}),`\n`,_jsx(_components.p,{children:`If an account is explicitly deleted while refunds are outstanding, those refunds can become undeliverable. Wait for outstanding receipts and refund outcomes before deleting an account.`}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`https://github.com/near/nearcore/blob/2.13.4/runtime/runtime/src/lib.rs`,children:`runtime refund handling`}),`.`]}),`\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.`})]})}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":[]}],"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-10-09T12:17:31.872Z","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.app/_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=df941d03d19b89657352cf9a\u0026amp;signature=9e68db767fec58e1eb5545fa7ae5c6b0afa1e328bc1d1d895404965d83f5b9d4\">\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.app/_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=df941d03d19b89657352cf9a\u0026amp;signature=9e68db767fec58e1eb5545fa7ae5c6b0afa1e328bc1d1d895404965d83f5b9d4\">\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-10-09T12:17:31.872Z\",\"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-10-09T12:17:31.872Z\",\"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\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","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"}]}]},"title":"Error Handling - NEAR Docs","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":[],"chunks":[]}