mirror of https://github.com/abpframework/abp.git
4 changed files with 45 additions and 5 deletions
@ -0,0 +1,20 @@ |
|||
using System.Collections.Generic; |
|||
using System.Net; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling |
|||
{ |
|||
public class ExceptionHttpStatusCodeOptions |
|||
{ |
|||
public IDictionary<string, HttpStatusCode> ErrorCodeToHttpStatusCodeMappings { get; } |
|||
|
|||
public ExceptionHttpStatusCodeOptions() |
|||
{ |
|||
ErrorCodeToHttpStatusCodeMappings = new Dictionary<string, HttpStatusCode>(); |
|||
} |
|||
|
|||
public void Map(string errorCode, HttpStatusCode httpStatusCode) |
|||
{ |
|||
ErrorCodeToHttpStatusCodeMappings[errorCode] = httpStatusCode; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue