{"id":28922762,"url":"https://github.com/nashysolutions/error-presentation","last_synced_at":"2025-07-27T16:11:02.121Z","repository":{"id":298296667,"uuid":"999285090","full_name":"nashysolutions/error-presentation","owner":"nashysolutions","description":"A lightweight Swift package for presenting clean, localised, user-friendly error messages in SwiftUI and UIKit.","archived":false,"fork":false,"pushed_at":"2025-06-15T01:18:43.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-04T11:48:03.454Z","etag":null,"topics":["dependency-injection","error-handling","localized-errors","spm","swift","swiftui","testability","user-facing-errors"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/nashysolutions.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,"zenodo":null}},"created_at":"2025-06-10T03:03:35.000Z","updated_at":"2025-06-15T01:18:46.000Z","dependencies_parsed_at":"2025-07-04T11:38:51.244Z","dependency_job_id":"4cd60d44-f0c6-4bab-9996-75ab98d0d6ae","html_url":"https://github.com/nashysolutions/error-presentation","commit_stats":null,"previous_names":["nashysolutions/error-presentation"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nashysolutions/error-presentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashysolutions%2Ferror-presentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashysolutions%2Ferror-presentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashysolutions%2Ferror-presentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashysolutions%2Ferror-presentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nashysolutions","download_url":"https://codeload.github.com/nashysolutions/error-presentation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashysolutions%2Ferror-presentation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267384364,"owners_count":24078576,"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-07-27T02:00:11.917Z","response_time":82,"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":["dependency-injection","error-handling","localized-errors","spm","swift","swiftui","testability","user-facing-errors"],"created_at":"2025-06-22T08:05:57.627Z","updated_at":"2025-07-27T16:11:02.101Z","avatar_url":"https://github.com/nashysolutions.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Error Presentation\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fnashysolutions%2Ferror-presentation%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/nashysolutions/error-presentation)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fnashysolutions%2Ferror-presentation%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/nashysolutions/error-presentation)\n\nA lightweight Swift package for defining **clean, user-friendly, localised error messages**.\n\nThis package introduces a single, purposeful protocol — `LocalizedCustomerFacingError` — to help you avoid leaking internal details into your user interface, while still supporting developer-friendly logging and diagnostics.\n\n---\n\n## Usage\n\n```swift\nenum LoginError: LocalizedCustomerFacingError {\n    case invalidPassword\n\n    var userFriendlyLocalizedDescription: String {\n        String(localized: \"login.invalidPassword\", defaultValue: \"Your password is incorrect.\")\n    }\n}\n```\n\nUse in SwiftUI\n\n```swift\n.alert(item: $error) { error in\n    Alert(title: Text(error.localizedDescription))\n}\n```\n\nAnd log developer-friendly details separately:\n\n```swift\nextension LoginError: CustomDebugStringConvertible {\n    var debugDescription: String {\n        \"LoginError.invalidPassword: Password did not match server response\"\n    }\n}\n\nlogger.debug(\"Login failed: \\(error)\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnashysolutions%2Ferror-presentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnashysolutions%2Ferror-presentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnashysolutions%2Ferror-presentation/lists"}