December 2019
Intermediate to advanced
510 pages
11h 33m
English
The customization and serialization of the exceptions is a helpful way to simplify error handling and improve the monitoring of the web service. These techniques are sometimes necessary for communicating exceptions to a client so that errors can be handled and managed. In general, while the HTTP status code provides summary information about the status of the request, the content of the response provides more detailed information about the error.
It is possible to extend the error handling behavior using filters. First of all, let's create a new standard model that represents an error result:
namespace Catalog.API.Exceptions{ public class JsonErrorPayload { public int EventId { get; set; } public object DetailedMessage ...