Skip to content

Commit

Permalink
renamed exception class
Browse files Browse the repository at this point in the history
  • Loading branch information
Vipul Malhotra committed Jun 5, 2024
1 parent 990288f commit 1f71462
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public async Task<GetProductResponse> Handle(GetProductRequest request, Cancella
async () =>
{
var productItem = await repository.GetByIdAsync(request.Id, cancellationToken);
if (productItem == null) throw new ProductItemNotFoundException(request.Id);
if (productItem == null) throw new ProductNotFoundException(request.Id);
return new GetProductResponse(productItem.Id, productItem.Name, productItem.Description, productItem.Price);
},
cancellationToken: cancellationToken);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using FSH.Framework.Core.Exceptions;

namespace FSH.WebApi.Catalog.Domain.Exceptions;
public sealed class ProductItemNotFoundException : NotFoundException
public sealed class ProductNotFoundException : NotFoundException
{
public ProductItemNotFoundException(Guid id)
public ProductNotFoundException(Guid id)
: base($"product with id {id} not found")
{
}
Expand Down

0 comments on commit 1f71462

Please sign in to comment.