Interface IErrorMappingFactory
- Namespace
- MRX.UI.ErrorsAutoWiring.Abstractions
- Assembly
- MRX.UI.ErrorsAutoWiring.dll
Maps coded errors returned by an HTTP response to the fields of the model bound to an EditContext.
public interface IErrorMappingFactory
Methods
CreateErrorFieldMap(EditContext, Dictionary<string, CodedError[]>, HttpResponseMessage)
Builds a map of field identifiers to their associated coded errors.
Dictionary<FieldIdentifier, List<CodedError>> CreateErrorFieldMap(EditContext editContext, Dictionary<string, CodedError[]> errors, HttpResponseMessage response)
Parameters
editContextEditContextThe edit context whose model the errors should be mapped against.
errorsDictionary<string, CodedError[]>The coded errors, keyed by the server-provided error key.
responseHttpResponseMessageThe HTTP response the errors were extracted from.
Returns
- Dictionary<FieldIdentifier, List<CodedError>>
A dictionary linking each resolved field identifier to the list of errors that apply to it.