-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
order_nr is null for OrganisationFields #141
Comments
Same here for issuing the following call.
The error I get back indicates --- System.AggregateException: One or more errors occurred. (Error converting value {null} to type 'System.Int64'. Path 'data[5].order_nr', line 1, position 2646.). I'm wondering if Pipedrive made potentially breaking changes to their API? Looking back through my e-mail I do see mention of breaking changes to the Users API endpoints. That doesn't take effect until next year, however. Browsing through their changelog I don't see anything either. |
The same applies to deals once those have been customized. That's where I started receiving errors: |
I have reached out to Pipedrive API support, but they are at the initial stages of asking if the API response itself offers an HTTP status code indicating an error. When the issue is the API response body now offering a null instead of a 0 value for these custom fields. I would assume that this particular project could handle the difference by making these fields nullable. Like this below. It's not just the order_nr field, lots of others are now being returned as null values in the JSON response body. Even DateTime and Boolean. |
+1, I have the same confirmation of the same behavior since since Dec 24th. |
This can be bypassed (until author releases a fix) by reusing the library integration code eg. (I needed only the two
|
I believe that strings in and of themselves are inherently nullable anyway, correct? There are a lot of DateTime and Boolean fields that are now nullable in the Pipedrive API response. These fields would all need to be wrapped similar to your code above. Not to mention that there are a total of 6 field classes that would require this for the workaround to be complete. |
@gregarican yes, aside booleans DateTimes also as you speak of, in my case name and key are always needed but strings can be null yes. |
@DavidRouyer when you get a chance, can you please review my pull request? #143 This should fix the issue, as the Pipedrive API response now introduces a breaking change into any of these six field classes being parsed correctly. Thanks! |
I did raise this new issue to Pipedrive Support. Here was the most recent response from them. FYI.
|
Update from support:
Seems in progress. |
Yep sounds like they are on it. I got a similar response. The workaround of defining these various models in this project so that their elements are nullable would help eliminate this fail point in the future.
|
Update 10min ago:
I have not retested. |
Not from here.
|
@vmandic , I received a similar e-mail from Pipedrive Support this morning. Stating that it should be resolved. Apparently not. That's why the one Pull Request I have out there should address the matter from this project's end of things. As long as those fields are defined as nullable then this quirk shouldn't break anything. UPDATE: When I just ran a query to retrieve all PersonField values, I see that the order_nr element is no longer being passed back as null. And the various Booleans aren't being passed back as null either. The only element I see that can be passed back as null are some of the id element values. Although I honestly don't recall if this was the case last month or what. |
Looks like I was too quick, or hit some caching thing. I tested again about an hour later and its resolved for me now. |
Describe the bug
Just today I started getting some errors on using
OrganisationFields.GetAll()
One or more errors occurred. (Error converting value {null} to type 'System.Int64'. Path 'data[22].order_nr', line 1, position 12274.) Error converting value {null} to type 'System.Int64'. Path 'data[22].order_nr', line 1, position 12274. Null object cannot be converted to a value type.
Using PostMan to inspect the API, this API call pulls all our custom fields but also includes a bunch of standard items now. E.g.
Stack Trace:
I'm not aware anything was changed on our Pipedrive account.
To Reproduce
Call
OrganisationFields.GetAll()
Expected behavior
Valid response object
System Information
.NET SDK (reflecting any global.json):
Version: 6.0.202
Commit: f8a55617d2
Runtime Environment:
OS Name: Mac OS X
OS Version: 13.1
OS Platform: Darwin
RID: osx-x64
Base Path: /usr/local/share/dotnet/sdk/6.0.202/
Pipedrive Client Package v0.5.19
The text was updated successfully, but these errors were encountered: