Comments (7)
Hi @Rush, the error is used to reject the Bluebird promise. Since you don't handle the error Bluebird is printing the error message.
What you need to do it to add a catch handler:
rp({
uri: 'http://localhost:60000/some/route',
method: 'GET',
resolveWithFullResponse: true,
headers: {
cookie: undefined
}
})
.catch(function (err) {
// Handle your error here.
});
Does this help?
from request-promise.
Nope, it's not bluebird. Bluebird would print Unhandled rejection
. This error is simply not passed to the Promise, it's not rejecting the promise and simply crashing my app. I can catch it with uncaughtException
event only.
from request-promise.
Oh, I see. I just ran the code in my environment and didn't even get an error - the request succeeded. I use node 0.10.40, request-promise 1.0.0, request 2.65.0, and bluebird 2.10.2. Which versions do you use?
from request-promise.
Node 4.1.2. I didn't get any errors before 0.12 -> 4.1 upgrade.
from request-promise.
Sorry, I still don't get an error with node 4.1.2.
My test code prints "done":
var rp = require('request-promise');
rp({
uri: 'http://localhost:3000/some/route',
method: 'GET',
resolveWithFullResponse: true,
headers: {
cookie: undefined
}
})
.then(function () {
console.log('done');
});
Can you check if you provided the correct code snippet?
from request-promise.
Where you able to fix the issue? If not, please help me to reproduce the error.
from request-promise.
Hi @Rush I am closing this issue now. If you need some help feel free to reopen this issue.
from request-promise.
Related Issues (20)
- Proper way to do retry logic
- How to transform response headers?
- Produces warning for jest 25.5.0
- Uploading file with metadata using unirest js api causing trouble when sending data
- How to curl --http 1.0 in request-promise
- 如何请求图片,返回的数据如何处理呢 HOT 1
- Hey @pradiptabasu , you need to install `request` yourself before you install `request-promise`. See the [installation instructions](https://github.com/request/request-promise#installation).
- error message RequestError: Error: Invalid URI "xxxxxxxx",how to deal it?
- Error: Client network socket disconnected before secure TLS connection was established HOT 3
- Including this library will drag a ton of deps/files... sad
- Error: EPERM: operation not permitted, read
- Terminal
- read timeout
- How to see the request of a failed request ? HOT 3
- WeChat Mini Program can't support 'promise' grammar
- requestpromise
- ignore proxy signed certificate(ssl) issue in request-promise HOT 1
- The "request" library is not installed automatically anymore.
- Request/request-promise
- Issue on a dependency - CVE-2023-26136 HOT 1
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 request-promise.