RocketChat / Rocket.Chat.js.SDK

Utility for apps and bots to interact with Rocket.Chat via DDP and/or API
MIT License
136 stars 95 forks source link

RestAPI improve error handling #79

Open mriedmann opened 5 years ago

mriedmann commented 5 years ago

As far as I understand it, the current code does not allow to handle errors on api.get and api.post calls. I added rethrow instructions to work around this issue. If I got something wrong here, please help me find a way to handle api-errors in frontend with the current release.

If this is a "bug" please accept my PR. Thx!

mriedmann commented 5 years ago

We are using this patch in production (with rocketchat-hubot) for quite a while now without any problems. Is there anything I can do to get this upstream?

gabrielrufino commented 4 years ago

Hey, admin :D Merge this PR

mriedmann commented 4 years ago

Maybe @sampaiodiego could give a short statement on this topic (RestAPI error handling)? It would be really great.

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

taimoorsaleem commented 4 years ago

Hey! any update on this PR?

TBG-FR commented 3 years ago

@sampaiodiego Sorry to bother you, but this PR is quite useful, especially for bots