{"id":22519139,"url":"https://github.com/mikeludemann/error-classes","last_synced_at":"2025-08-02T00:43:13.175Z","repository":{"id":98485368,"uuid":"253496082","full_name":"mikeludemann/error-classes","owner":"mikeludemann","description":"Some different classes for handling the error types and more","archived":false,"fork":false,"pushed_at":"2020-04-07T15:04:21.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-28T02:49:01.308Z","etag":null,"topics":["classes","custom-error","custom-error-class","error","error-classes","error-handling"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikeludemann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-06T12:49:40.000Z","updated_at":"2023-05-23T02:52:37.000Z","dependencies_parsed_at":"2023-03-13T15:59:40.681Z","dependency_job_id":null,"html_url":"https://github.com/mikeludemann/error-classes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikeludemann/error-classes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeludemann%2Ferror-classes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeludemann%2Ferror-classes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeludemann%2Ferror-classes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeludemann%2Ferror-classes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeludemann","download_url":"https://codeload.github.com/mikeludemann/error-classes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeludemann%2Ferror-classes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268320316,"owners_count":24231800,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["classes","custom-error","custom-error-class","error","error-classes","error-handling"],"created_at":"2024-12-07T04:18:38.489Z","updated_at":"2025-08-02T00:43:13.156Z","avatar_url":"https://github.com/mikeludemann.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# error-classes\n\nSome different classes for handling the error types and more\n\n## Examples\n\n```js\nimport { StringError, NumberError, ArrayError, ObjectError, SymbolError, NullError, BooleanError, DateError, FunctionError, ValidationError, DatabaseError, PermissionError, InternalError, ResourceNotFoundError } from 'error-classes';\n\n...\n\nvar elem = ...;\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new StringError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new NumberError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new ArrayError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new ObjectError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new SymbolError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new NullError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new BooleanError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new DateError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new FunctionError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new ValidationError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new DatabaseError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new PermissionError(err, elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new ResourceNotFoundError(\"test\", elem);\n} finally {\n\tconsole.log(\"...\");\n}\n\ntry {\n\tfoobar();\n} catch(err) {\n\tthrow new InternalError(err);\n} finally {\n\tconsole.log(\"...\");\n}\n\n...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeludemann%2Ferror-classes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeludemann%2Ferror-classes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeludemann%2Ferror-classes/lists"}