mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-28 13:52:51 +08:00

As part of #66 we realised that the implementation of IErrorToHttpStatusCodeMapper would always return a wrapped StatusCode within an OK response, in turn meaning that ResponderMiddleware would never fall into the else branch for returning a 500. This commit removes the wrapping of the status code and removes the unused logic for generating the 500 status code, giving the mapper full responsbility for generating the correct status code.
14 lines
304 B
C#
14 lines
304 B
C#
using System.Collections.Generic;
|
|
using Ocelot.Errors;
|
|
|
|
namespace Ocelot.Responder
|
|
{
|
|
/// <summary>
|
|
/// Map a list OceoltErrors to a single appropriate HTTP status code
|
|
/// </summary>
|
|
public interface IErrorsToHttpStatusCodeMapper
|
|
{
|
|
int Map(List<Error> errors);
|
|
}
|
|
}
|