Skip to content

Add support for HttpStatusCode: Created to the ResultStatus mapping #196

@wtygibbs

Description

@wtygibbs

ResultStatusMap.AddDefaultMap() is missing the mapping for ResultStatus.Created.

I think this is an oversight because ResultStatusMap.AddDefaultMap()'s documentation says it adds default mapping for all known ResultStatus's.

Calling ResultExtensions.ToActionResult<T>(T Result) throws a System.Collections.Generic.KeyNotFoundException with the message:

The given key 'Created' was not present in the dictionary

  1. Is there a reason I don't know of for why Created is not in the mapping?
  2. Support for the Created HttpStatusCode should be added, or at least handle it and not throw an exception

If there is agreement on bullet point 2, I am open to working on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions