<commit_before>WebApiProblem
=============

A small framework for turning exceptions into good Rest responses in WebApi

It is based on the recomendations in http://tools.ietf.org/html/draft-nottingham-http-problem-03

## Use

 1) Install the package from nuget:
		

		PM > Install-Package WebApiProblem


 2) Register the ResponseExceptionFilterAttribute (either in `ApplicationStart` or wherever you register your filters)
		

		GlobalConfiguration.Configuration.Filters.Add(new WebApiProblem.ResponseExceptionFilterAttribute());


 3) Throw an exception of type `BasicApiProblemException`

 
		 // GET api/values/5
        public string Get(int id)
        {<commit_msg>making the readme more visible to goolge searches (mention api-problem<commit_after>WebApiProblem
=============

## application/api-problem

A small framework for turning exceptions into good Rest responses in WebApi.

It is based on the recomendations in http://tools.ietf.org/html/draft-nottingham-http-problem-03

It supports responses in json:

application/api-problem+json

and xml:

application/api-problem+xml

## Use

 1) Install the package from nuget:
		

		PM > Install-Package WebApiProblem


 2) Register the ResponseExceptionFilterAttribute (either in `ApplicationStart` or wherever you register your filters)
		

		GlobalConfiguration.Configuration.Filters.Add(new WebApiProblem.ResponseExceptionFilterAttribute());


 3) Throw an exception of type `BasicApiProblemException`

 
		 // GET api/values/5
        public string Get(int id)
        {
{'fraction_non_alphanumeric': 0.08414872798434442, 'fraction_numerical': 0.007827788649706457, 'mean_word_length': 4.326388888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1232115', 'n_tokens_mistral': 452, 'n_tokens_neox': 388, 'n_words': 137}