Skip to content

Conversation

@sharwell
Copy link

Some APIs return additional exception information in a known format. When this occurs, the message provided by the server is used for the exception that gets thrown. If the returned value could not be parsed in the known format, the default exception message for the HTTP status code is used.

The implementation of this feature includes two new classes which can be reused:

  • ResponseExtensions: Provides the TryGetHeader extension method to get a header specified by the HttpResponseHeaders enumeration without requiring the developer to include the string literal representation of the header key
  • RestWebHeaderCollection: Extends WebHeaderCollection by not treating particular headers (e.g. Content-Type) as reserved (see the documentation for WebHeaderCollection for additional details).

…om the API call in the resulting exception details
alanquillin added a commit that referenced this pull request Jul 23, 2013
@alanquillin alanquillin merged commit b45c24c into rackspace:master Jul 23, 2013
@sharwell sharwell deleted the ExceptionMessages branch July 23, 2013 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants