FortnoxAB / csharp-api-sdk

.NET SDK for Fortnox API.
MIT License
51 stars 64 forks source link

Null check before Uri.EscapeDataString #248

Closed Vidofner closed 1 year ago

Vidofner commented 1 year ago

Uri.EscapeDataString doesn't accept null values and since some connectors accept a default value of null on their parameters, that means the 'Indices' property will contain null in some cases. For example GetAsync(string priceListCode, string articleNumber, decimal? fromQuantity = null) in ProceConnector.cs. Without this null check you will get the following error if you don't specify the fromQuantity parameter: Value cannot be null. (Parameter 'stringToEscape')