internal CommunicationError(string code, string message, string target, IReadOnlyList <CommunicationError> details, CommunicationError innerError) { Code = code; Message = message; Target = target; Details = details; InnerError = innerError; }
internal CommunicationErrorResponse(CommunicationError error) { if (error == null) { throw new ArgumentNullException(nameof(error)); } Error = error; }
internal static CommunicationErrorResponse DeserializeCommunicationErrorResponse(JsonElement element) { CommunicationError error = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("error")) { error = CommunicationError.DeserializeCommunicationError(property.Value); continue; } } return(new CommunicationErrorResponse(error)); }