{
  "id": "dfe5cc7f1b336733080b5f65",
  "source": "solid:signals",
  "type": "github-document",
  "title": "catch-error",
  "content": "---\ntitle: catchError\nuse_cases: \u003e-\n  error handling, error boundaries, exception management, debugging, graceful\n  error recovery\ntags:\n  - errors\n  - debugging\n  - exceptions\n  - handlers\nversion: '1.0'\ndescription: \u003e-\n  Wrap SolidJS code with error handlers to catch and handle exceptions\n  gracefully. Create error boundaries for robust error management in components.\n---\n\n:::note\n\u003cspan\u003eNew in v1.7.0\u003c/span\u003e\n:::\n\n```tsx\nimport { catchError } from \"solid-js\"\n\nfunction catchError\u003cT\u003e(tryFn: () =\u003e T, onError: (err: any) =\u003e void): T\n```\n\nWraps a `tryFn` with an error handler that fires if an error occurs below that point.\nOnly the nearest scope error handlers execute.\nRethrow to trigger up the line.",
  "url": "https://github.com/solidjs/solid-docs/blob/HEAD/src/routes/reference/reactive-utilities/catch-error.mdx",
  "metadata": {
    "path": "src/routes/reference/reactive-utilities/catch-error.mdx",
    "repo": "solidjs/solid-docs",
    "repo_url": "https://github.com/solidjs/solid-docs.git",
    "size": 705,
    "source_type": "github"
  },
  "hash": "57b6feafaba6d58bf14858cc7c7e2d826e2dce8027c4c46058ac23eae0011e88",
  "timestamp": "2026-02-23T11:43:00.189802672+01:00"
}