Represent a generic response from a REST API call
Beispiel #1
0
        /// <summary>
        /// Creates a generic invalid request response
        /// </summary>
        public static ApiResult InvalidRequest()
        {
            var result = new ApiResult() { Payload = "Invalid Request" };
            result.Errors.Add(new ApiErrorItem()
            {
                ErrorCode = ApiErrorCode.Generic,
                ErrorType = ApiErrorType.GeneralFailure,
                FieldName = "",
                Message = "Invalid Request"
            });

            return result;
        }