Giter VIP home page Giter VIP logo

wsabi-client's People

Contributors

jamesbirtles avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wsabi-client's Issues

[Feature] Timeout on requests

When you send a request to a server the client should have an inbuilt timeout for not getting a response back. Either using Promises or a setTimeout. Example being if you send a request using an uppercase on the method or a URL which the API / site takes a while to resolve. (Basically sites that don't force a timeout) the Promise sits for ages w/o timing out.

Obviously the application can do the timeout's is self but in theory the module should be also handling timeouts / dead responses from the live socket.

Errors on .live are uncatchable

I'd like to be able to catch error messages that come from the server on a call to .live

I was making a silly mistake, (omitting one set of :'s from a slug) on call to .live

wsabi.live(`user:000update`).subscribe(....)

And there's currently no way to catch or even investigate a failed promise from a call to .live.

https://github.com/ExoZoneDev/wsabi-client/blob/master/src/client.js#L100 doesn't expose the promise back to the implementation.

The same problem doesn't occur with .put,.get etc as the request promises are returned.

I'm not sure on the best way to resolve this without breaking existing API so i'm opening an issue. For now I've got a rejection handler and some console.logs manually inserted within my projects node_modules/ not ideal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.