Created
June 13, 2018 21:22
-
-
Save sw-carlin/2037a3bb2f6279e6b0245ed2fbfd84a3 to your computer and use it in GitHub Desktop.
ServiceStack exception to http status code mapping examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
appHost.Config = new HostConfig | |
{ | |
MapExceptionToStatusCode = new Dictionary<Type, int> | |
{ | |
[typeof(InvalidOperationException)] = 409 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment