Added RequestException. It is thrown when request fails.

Currently when request to API fails, it just silently does, there is no way to know about it. I made it throw RequestException in this case. This allows programmer to know of what happened. They can catch error if they wish so.