{"id":49937869,"url":"https://github.com/floppyshelf/problemize","last_synced_at":"2026-05-17T08:12:18.692Z","repository":{"id":357295976,"uuid":"1109944788","full_name":"FloppyShelf/Problemize","owner":"FloppyShelf","description":"This package offers a robust, extensible framework for centralized exception handling in .NET Web APIs. It standardizes error responses with ProblemDetails, supports custom exceptions, and features flexible status code mapping. Integrated via middleware, it ensures clean, maintainable global error handling.","archived":false,"fork":false,"pushed_at":"2025-12-12T16:17:33.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T08:07:23.724Z","etag":null,"topics":["api","aspnetcore","centralized-logging","custom-exceptions","error-handling","exception-handling","extensibility","global-exception-handlers","maintainable","middleware","problem-details","robust","statuscode-mapping","validation-errors","webapi"],"latest_commit_sha":null,"homepage":"","language":"C#","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/FloppyShelf.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-04T13:56:44.000Z","updated_at":"2025-12-12T16:33:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/FloppyShelf/Problemize","commit_stats":null,"previous_names":["floppyshelf/problemize"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/FloppyShelf/Problemize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloppyShelf%2FProblemize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloppyShelf%2FProblemize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloppyShelf%2FProblemize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloppyShelf%2FProblemize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FloppyShelf","download_url":"https://codeload.github.com/FloppyShelf/Problemize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloppyShelf%2FProblemize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33131473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T06:27:06.342Z","status":"ssl_error","status_checked_at":"2026-05-17T06:26:59.432Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","aspnetcore","centralized-logging","custom-exceptions","error-handling","exception-handling","extensibility","global-exception-handlers","maintainable","middleware","problem-details","robust","statuscode-mapping","validation-errors","webapi"],"created_at":"2026-05-17T08:12:14.837Z","updated_at":"2026-05-17T08:12:18.679Z","avatar_url":"https://github.com/FloppyShelf.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![FloppyShelf.Problemize](logo/Problemize.png \"FloppyShelf.Problemize\")\n\n\n# Problemize\n\nThis package provides a robust and extensible framework for centralized exception handling in .NET Web APIs. It standardizes error responses using ProblemDetails, supports custom exceptions and includes a flexible status code mapping system. The package integrates seamlessly via middleware and service configuration, making global error handling clean and maintainable.\n\n## Features\n\n`IStatusCodeMapper`\nAn interface to decouple the logic of mapping exceptions to HTTP status codes. Makes it easy to extend or override.\n\n`StatusCodeMapper`\nDefault implementation of `IStatusCodeMapper`, handling common .NET exceptions like `ArgumentException`, `UnauthorizedAccessException` and `NotImplementedException`.\n\n`ExceptionHandler`\nImplements `IExceptionHandler` from ASP.NET Core. This service:\n- Maps the exception to an HTTP status code.\n- Converts exceptions into a standardized `ProblemDetails` or `ValidationProblemDetails`.\n- Writes the response using `IProblemDetailsService`.\n\n`Configurator`\nContains extension methods for:\n- Registering services\n- Configuring middleware\n\n## Setup Instructions\n\n1. Register services in `Program.cs`\n```csharp\nbuilder.Services.UseExceptionHandling();\n```\n\n2. Configure middleware in `Program.cs`\n```csharp\napp.UseExceptionHandling();\n```\n\n## Sample ProblemDetails response\n```json\n{\n  \"title\": \"An error occured while validating your request\",\n  \"detail\": \"Invalid data\",\n  \"type\": \"ValidationException\",\n  \"status\": 400,\n  \"instance\": \"POST /api/users\",\n  \"extensions\": {\n    \"requestId\": \"00-abcd1234...\",\n    \"activityId\": \"00-xyz5678...\"\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloppyshelf%2Fproblemize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloppyshelf%2Fproblemize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloppyshelf%2Fproblemize/lists"}