Browse Source

Merge pull request #175 from dotnet-architecture/ardalis/typo-patch

Cleaning up and fixing typos
pull/223/head
Cesar De la Torre 7 years ago
committed by GitHub
parent
commit
527e66cea0
1 changed files with 3 additions and 7 deletions
  1. +3
    -7
      src/Services/Basket/Basket.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs

+ 3
- 7
src/Services/Basket/Basket.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs View File

@ -4,11 +4,7 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
namespace Basket.API.Infrastructure.Filters
{
@ -43,12 +39,12 @@ namespace Basket.API.Infrastructure.Filters
{
var json = new JsonErrorResponse
{
Messages = new[] { "An error ocurr.Try it again." }
Messages = new[] { "An error occurred. Try it again." }
};
if (env.IsDevelopment())
{
json.DeveloperMeesage = context.Exception;
json.DeveloperMessage = context.Exception;
}
context.Result = new InternalServerErrorObjectResult(json);
@ -61,7 +57,7 @@ namespace Basket.API.Infrastructure.Filters
{
public string[] Messages { get; set; }
public object DeveloperMeesage { get; set; }
public object DeveloperMessage { get; set; }
}
}
}

Loading…
Cancel
Save