Skip to content

Commit

Permalink
feat: default value error code to unspecified
Browse files Browse the repository at this point in the history
  • Loading branch information
jpill committed Apr 22, 2024
1 parent 32bfb5d commit 49dfc2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ShipEngine/Models/Dto/Common/ShipEngineAPIError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Collections.Generic;
using System.ComponentModel;

namespace ShipEngineSDK.Common
{
Expand Down Expand Up @@ -47,7 +48,9 @@ public class Error
/// The error code specified for the failed API Call
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public ErrorCode ErrorCode { get; set; }
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
[DefaultValue(ErrorCode.Unspecified)]
public ErrorCode ErrorCode { get; set; } = ErrorCode.Unspecified;

/// <summary>
/// An error message associated with the failed API call
Expand Down

0 comments on commit 49dfc2f

Please sign in to comment.