{"id":26974955,"url":"https://github.com/sixpaq/capitalsix.aspnetcore.middleware.errorhandling","last_synced_at":"2026-05-01T09:31:39.418Z","repository":{"id":281524696,"uuid":"478978984","full_name":"sixpaq/CapitalSix.AspNetCore.Middleware.ErrorHandling","owner":"sixpaq","description":"Middleware module for aspnetcore, which handles all uncaught exceptions and creates customizable JSON responses.","archived":false,"fork":false,"pushed_at":"2025-03-22T15:03:20.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-18T16:17:13.151Z","etag":null,"topics":["aspnetcore","errorhandling","json","middleware"],"latest_commit_sha":null,"homepage":"","language":"C#","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/sixpaq.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,"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":"2022-04-07T12:39:09.000Z","updated_at":"2025-03-22T15:03:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"61c4e0a0-045e-4dd6-848b-c65f85355c98","html_url":"https://github.com/sixpaq/CapitalSix.AspNetCore.Middleware.ErrorHandling","commit_stats":null,"previous_names":["sixpaq/capitalsix.aspnetcore.middleware.errorhandling"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sixpaq/CapitalSix.AspNetCore.Middleware.ErrorHandling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sixpaq%2FCapitalSix.AspNetCore.Middleware.ErrorHandling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sixpaq%2FCapitalSix.AspNetCore.Middleware.ErrorHandling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sixpaq%2FCapitalSix.AspNetCore.Middleware.ErrorHandling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sixpaq%2FCapitalSix.AspNetCore.Middleware.ErrorHandling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sixpaq","download_url":"https://codeload.github.com/sixpaq/CapitalSix.AspNetCore.Middleware.ErrorHandling/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sixpaq%2FCapitalSix.AspNetCore.Middleware.ErrorHandling/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["aspnetcore","errorhandling","json","middleware"],"created_at":"2025-04-03T11:18:34.896Z","updated_at":"2026-05-01T09:31:39.398Z","avatar_url":"https://github.com/sixpaq.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CapitalSix.AspNetCore.Middleware.ErrorHandling\n\nThis module captures \"uncaught\" exceptions and generated ProblemDetail results in json format.\n\n\n### How to configure the module.\n```c#\nvoid ConfigureServices(IServicesCollection services)\n{\n    ...\n    services\n        .AddControllers()\n        .AddExceptionMiddleware();\n    ...\n}\n\nvoid Configure(IApplicationBuilder app)\n{\n    ...\n    app.UseExceptionMiddleware();\n    ...\n}\n```\n\n### Customizing\nIt is possible to customize the middleware by adding custom mappings. For each type of\nexception a mapping can be added. This mapping is responsible for the conversion\nfrom Exception to ProblemDetails.\n```c#\nvoid ConfigureServices(IServicesCollection services)\n{\n    ...\n    services.Configure\u003cExceptionMiddlewareOptions\u003e(options =\u003e\n    {\n        options.Mappings.Add\u003cArgumentNullException\u003e(ex =\u003e\n             new ProblemDetails()\n            {\n                Status = 500,\n                Title = \"Arguments are not allowed to be null\"\n            });\n    });\n    ...\n}\nbuilder.Services\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixpaq%2Fcapitalsix.aspnetcore.middleware.errorhandling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsixpaq%2Fcapitalsix.aspnetcore.middleware.errorhandling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixpaq%2Fcapitalsix.aspnetcore.middleware.errorhandling/lists"}