Comment

Comment by smathieu

Original gem author here!

We were scratching out own itch by doing this. This is currently used by several of our projects.

It does feel like the HTTP libraries should be better and handling these various exceptions. Since they don't, we've ended up writing this.

For the most part, whenever we do any HTTP call, we are expecting a specific return code and we want to raise an easy to handle exception when this happens. However, many HTTP call don't even get to the point where an error code is return when the network is not reliable. We've found that in most case, we want to handle that exception in the same way than an unexpected error code.

This little gem let us do that easily.

Enjoy :)

parent smathieu 12 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton