{"id":16386389,"url":"https://github.com/tmcw/errors","last_synced_at":"2026-05-25T02:30:19.694Z","repository":{"id":26059063,"uuid":"29502583","full_name":"tmcw/errors","owner":"tmcw","description":"Brief examples of types of errors in JavaScript.","archived":false,"fork":false,"pushed_at":"2016-01-31T20:50:47.000Z","size":6,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"gh-pages","last_synced_at":"2025-02-16T12:59:01.103Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.macwright.org/errors/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmcw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-19T23:48:45.000Z","updated_at":"2020-06-10T04:03:43.000Z","dependencies_parsed_at":"2022-07-24T08:31:50.698Z","dependency_job_id":null,"html_url":"https://github.com/tmcw/errors","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmcw%2Ferrors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmcw%2Ferrors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmcw%2Ferrors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmcw%2Ferrors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmcw","download_url":"https://codeload.github.com/tmcw/errors/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240138967,"owners_count":19754023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T04:17:08.530Z","updated_at":"2026-05-25T02:30:17.641Z","avatar_url":"https://github.com/tmcw.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [error-types](http://www.macwright.org/2015/02/28/errors.html)\n\nBrief examples of types of errors in JavaScript.\n\nSee the [/types](/types) directory for examples of each error type.\n\n## [SyntaxError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError)\n\nThis error happens at the **compile phase**, so it prevents\nany part of the program from running.\n\nThe only way that a SyntaxError can occur in an already-running program is\nif it uses a form of eval, like `eval()` or `new Function()`, or uses\n`RegExp` and gives it an invalid regular expression.\n\n## [ReferenceError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError)\n\nAn invalid reference to a variable that doesn't exist. This can sneak in\ndue to confusion about scope in JavaScript.\n\n## [TypeError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError)\n\nThis often occurs when a user tries to call functions on\nan object that don't exist on that object.\n\nYou can also get a TypeError if you try to assign properties to an object\nfrozen with `Object.freeze`. TypeErrors are the most common error to get by\nmisusing an API, like calling `fs.readFileSync()` in node.js.\n\n## [RangeError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError)\n\nOccurs when you create an `Array` with an invalid length, but also occurs\non simple infinitely recursive loops in node.js.\n\n## [URIError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError)\n\nOccurs when you try to decode or encode an invalid URI with a built-in function\nlike decodeURI, encodeURI, decodeURIComponent, or encodeURIComponent.\n\n## [InternalError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError)\n\nThis is an error triggered by infinite recursion in Firefox only: other browsers don't implement\nInternalError and produce a RangeError instead for infinite recursion.\n\nTrigger:\n\n```js\n(function a() { return a(); })()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmcw%2Ferrors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmcw%2Ferrors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmcw%2Ferrors/lists"}