closeio / closeio-node

An Unofficial Close.io API wrapper for Node.js.
19 stars 18 forks source link

Test Failure: Close.io API should throw a verbose error #11

Closed cpb closed 7 years ago

cpb commented 8 years ago

Hello,

Is this an expected test result?

  Close.io API
    ✓ should create, read, updated, delete and search for leads. (741ms)
    1) should throw a verbose error
    ✓ should create, read, update, delete lead statuses (550ms)
    ✓ should create, read, update, delete opportunity statuses (509ms)

  3 passing (4s)
  1 failing

  1) Close.io API should throw a verbose error:
     Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.

Or should there be an assertion that captures that time out error? What error are you expecting? Is this typical response time for the close.io service?

philfreo commented 8 years ago

I don't know what's going on with the codebase/test, however the Close.io API should be responding in under 2s for sure, so this likely seems like a node code issue.

cpb commented 8 years ago

Is there some kind of rich / "verbose" error that I am not seeing? Could I wrap this example in a try catch and make an assertion on the presence of an error? Is this the error message we expect ? :-)

On Mon, Feb 29, 2016 at 10:34 AM, Phil Freo notifications@github.com wrote:

I don't know what's going on with the codebase/test, however the Close.io API should be responding in under 2s for sure, so this likely seems like a node code issue.

— Reply to this email directly or view it on GitHub https://github.com/closeio/closeio-node/issues/11#issuecomment-190323754 .

philfreo commented 8 years ago

I'm not sure... to be honest this is a pretty unsupported (community generated) API wrapper so you might be better off simply doing basic HTTP requests to our REST API (developer.close.io) if it's giving you a ton of trouble. Improvements/pull requests welcome though if you do want to dive into the code and provide improvements here.

cpb commented 8 years ago

To be honest, I have barely looked at the code. I am just reporting on my first impressions without much reading or analysis of what is here.

I hear you clearly though: this is community supported.

Does close.io have any precedent for inviting community members as contributors?

Do you have any metrics for how many active api consumers are using this code?

Cheers!

On Mon, Feb 29, 2016 at 5:14 PM, Phil Freo notifications@github.com wrote:

I'm not sure... to be honest this is a pretty unsupported (or community supported) API wrapper so you might be better off simply doing basic HTTP requests to our REST API (developer.close.io) if it's giving you a ton of trouble. Improvements/pull requests welcome though if you do want to dive into the code and provide improvements here.

— Reply to this email directly or view it on GitHub https://github.com/closeio/closeio-node/issues/11#issuecomment-190477763 .

pcothenet commented 7 years ago

Fixed that one.