Comments (6)
As a follow up. I was able to reproduce the issue finally, and the delete was unrelated to my problem but a http error of 4xx
group as this issue relates to.
We basically have a situation where we do a object.save(handler)
call when nothing was changed in the object. In this case the client is doing a put
with an empty object {}
as no value has changed, and the server response with 400
.
The main issue is, therefore, that save, merge and duplicate do not propagate the error to the handler, but instead try to access data
. All these functions generate the same mentioned error in case the server response with anything else besides 200
containing an empty body.
This should be easy to fix.
from client-nodejs.
I have the same issue with the following:
console.log("initial: ", person["First Name"]); // output: undefined
person.set("First Name", firstName);
person.set("Last Name", lastName);
console.log("saved: ", person["First Name"]); // output: Bradley
person.save(function(err) { console.log("error", err); });
result is:
..../node_modules/pipedrive/lib/wrapCollectionItems.js:12
var itemId = item.id || false;
^
TypeError: Cannot read property 'id' of null
at doWrap (..../node_modules/pipedrive/lib/wrapCollectionItems.js:12:22)
at ..../node_modules/pipedrive/lib/wrapCollectionItems.js:37:5
from client-nodejs.
@super-cache-money Did you get "Got deal" in console? I think you don't have deal with id 123, so you can't save it. Tried your code, works ok to me
from client-nodejs.
Hey, this issue occurs for me when doing pipedrive.Deals.get
on a deleted deal. The item
passed into wrapCollectionItems.js:12:21
is null, and hence has no item.id
.
I would prefer an empty collection for this case, as it allows us to handle the not found case.
Can you fix this?
from client-nodejs.
from client-nodejs.
Still seeing the problem @JohannesHome mentions. When running within Node, hitting this kind of error in any call causes Node to crash, with no chance to intercept in a try/catch or callback.
We can't use this library because of this problem.
from client-nodejs.
Related Issues (20)
- Old version of formidable in superagent 5.3.x has a critical vulnerability HOT 1
- Normalization of a custom monetary field currency causes an error HOT 3
- Update organization forcing name as required HOT 2
- Api for search deals HOT 2
- Normalization of a custom field fails with null values HOT 1
- Cannot find module @babel/runtime/helpers/interopRequireDefault HOT 2
- Typo in OpenAPI document HOT 1
- TypeError: data.map is not a function HOT 2
- OrganizationsApi getOrganizations seems to ignore filter HOT 2
- more breaking changes on version 18 HOT 1
- Go SDK + CloudQuery Source Plugin HOT 1
- Critical dependency: the request of a dependency is an expression HOT 2
- Problem Adding a Person HOT 2
- Wrong example HOT 1
- ENAMETOOLONG: name too long upon install on Linux
- Why are collection endpoints' "since" timestamp inclusive?
- New Project Endpoints HOT 2
- Issue With Documentation of ActivityResponseObject HOT 2
- Throwing errors and good practices HOT 5
- Adding webhook HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from client-nodejs.