{"id":31649450,"url":"https://github.com/dominikj111/error-kit","last_synced_at":"2026-01-20T16:57:55.864Z","repository":{"id":313863791,"uuid":"1052539887","full_name":"dominikj111/error-kit","owner":"dominikj111","description":"🦀 Rust error handling library built on thiserror, providing standardized error messages, ergonomic constructor functions, and type-safe error patterns for developer-focused applications.","archived":false,"fork":false,"pushed_at":"2025-09-08T08:29:09.000Z","size":9709,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-09T08:42:25.442Z","etag":null,"topics":["error-handling","error-management","error-patterns","rust","thiserror"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dominikj111.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-08T07:42:16.000Z","updated_at":"2025-09-08T08:26:58.000Z","dependencies_parsed_at":"2025-09-09T08:42:28.481Z","dependency_job_id":"ba2c13b8-dd60-4546-92cc-e2eabfcb62c5","html_url":"https://github.com/dominikj111/error-kit","commit_stats":null,"previous_names":["dominikj111/error-kit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dominikj111/error-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikj111%2Ferror-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikj111%2Ferror-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikj111%2Ferror-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikj111%2Ferror-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dominikj111","download_url":"https://codeload.github.com/dominikj111/error-kit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikj111%2Ferror-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278740831,"owners_count":26037480,"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-10-07T02:00:06.786Z","response_time":59,"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":["error-handling","error-management","error-patterns","rust","thiserror"],"created_at":"2025-10-07T07:43:09.946Z","updated_at":"2025-10-07T07:43:19.128Z","avatar_url":"https://github.com/dominikj111.png","language":"Rust","readme":"\u003c!-- markdownlint-disable MD036 MD033 --\u003e\n\n# error-kit 🦀 ⚡\n\n[![Crates.io](https://img.shields.io/crates/v/error-kit)](https://crates.io/crates/error-kit)\n[![Documentation](https://docs.rs/error-kit/badge.svg)](https://docs.rs/error-kit)\n[![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![Dependency Status](https://deps.rs/repo/github/dominikj111/resourcely/status.svg)](https://deps.rs/repo/github/dominikj111/resourcely)\n[![Made with Rust](https://img.shields.io/badge/Made%20with-Rust-1f425f.svg?logo=rust)](https://www.rust-lang.org/)\n\nA comprehensive, developer-focused error handling infrastructure built on top of `thiserror`, providing standardized error messages, common error patterns, and ergonomic helper functions.\n\n## Design Principles 🏗️\n\nThis crate provides a \"batteries-included\" approach to error handling with these core principles:\n\n### Developer-Focused Messages 👩‍💻\n\nError messages provide technical context for developers, not end-user UI text.\n\n### Type-Safe Enums Over Error Codes 🔢\n\nUses `thiserror::Error` derive macro for compile-time checking, pattern matching, and IDE support.\n\n### Helper Functions Over Macros 🚀\n\nExplicit, debuggable functions instead of complex macros:\n\n```rust\n// Clear and debuggable ✨\nCommonError::io_error(\"Failed to read config file\")\n\n// Instead of macro magic 🪄❌\nerror!(\"Failed to read config file\")\n```\n\n### Centralized Message Constants 📚\n\nError messages defined as constants in a dedicated `messages` module for consistency and maintainability.\n\n## Usage Examples 💡\n\n### Adding error-kit to Your Project 📦\n\n```rust\n// Add to Cargo.toml\n[dependencies]\nerror-kit = \"0.1.0\"\n```\n\n### Using error-kit 🚀\n\n```rust\nuse error_kit::CommonError;\n\n// Using helper functions 🔧\nlet io_err = CommonError::io_error(\"Failed to read config file\");\nlet filename_err = CommonError::filename_error();\n\n// Using predefined message constants 📝\nlet timeout_err = CommonError::Timeout; // Uses messages::TIMEOUT_EXCEEDED\n\n// Simple error handling 🎯\nlet result: Result\u003cData, CommonError\u003e = some_operation();\n\nmatch result {\n    Err(e) =\u003e eprintln!(\"Error: {}\", e),\n    Ok(data) =\u003e process_data(data),\n}\n\n// Or pattern matching when you need specific handling\nmatch result {\n    Err(CommonError::Io(_)) =\u003e handle_io_error(),\n    Err(CommonError::Timeout) =\u003e retry_operation(),\n    Err(CommonError::FilenameError) =\u003e handle_filename_issue(),\n    Err(e) =\u003e eprintln!(\"Error: {}\", e),\n    Ok(data) =\u003e process_data(data),\n}\n```\n\n## Module Structure 🏗️\n\nThe `error-kit` crate is organized into focused modules:\n\n- **`messages`**: Centralized error message constants\n- **`constructors`**: Ergonomic constructor functions\n- **`types`**: Main error enum with `thiserror` integration\n\n```rust\nuse error_kit::{\n    CommonError,          // Main error type 🎯\n    messages,             // Message constants 📚\n    constructors,         // Helper constructor functions 🚀\n};\n```\n\n## Use Cases 🎯\n\n- **Library Development**: Structured error types with consistent messaging\n- **Application Development**: Standardized error handling with reduced boilerplate\n- **Error Infrastructure**: Foundation for domain-specific error crates and company standards\n\n## Future Vision 🔮\n\nThis crate aims to become the go-to foundation for error handling, providing:\n\n- Domain-specific error modules (network, filesystem, parsing, etc.)\n- Error reporting utilities and formatters\n- Integration helpers for popular crates\n- Best practice examples and patterns\n- Community-driven error message standards\n\n---\n\n## Contributing 🤝\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License 📄\n\nThis project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikj111%2Ferror-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominikj111%2Ferror-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikj111%2Ferror-kit/lists"}