sendgrid / python-http-client

Twilio SendGrid's Python HTTP Client for calling APIs
https://sendgrid.com
MIT License
126 stars 101 forks source link

Added support for error handling #17

Closed dibyadas closed 7 years ago

dibyadas commented 7 years ago

This PR deals with issue #16

Custom exceptions for python_http_client have been added. Only few exceptions have been added. Others will be added soon.

SendGridDX commented 7 years ago

CLA assistant check
All committers have signed the CLA.

dibyadas commented 7 years ago

Hi @thinkingserious ! I have added custom exception handling. Do suggest changes for improvements. (P.S - Sorry for the delay. I got caught up in some work)

dibyadas commented 7 years ago

Hi @w- ! Have a look at this. What do you think? :)

w- commented 7 years ago

Hey guys, i'll be out of town on vacation for the next few days. won't be able to respond on this topic till then.

thinkingserious commented 7 years ago

Thanks for the heads up @w- and I hope you enjoy the vacation :)

thinkingserious commented 7 years ago

@w-,

Do you have time to take a look? Thanks!

dibyadas commented 7 years ago

@thinkingserious,

In the meantime, how about I add tests for this? Where do you think would be a good place to add? Should I add it in the existing one or a different file for testing exceptions?

With Regards, Dibya Prakash Das

thinkingserious commented 7 years ago

@dibyadas,

Please add the test in the existing file. Thanks!

thinkingserious commented 7 years ago

Nice work @dibyadas and @w-! Looks like we are almost there :)

dibyadas commented 7 years ago

Hi @thinkingserious and @w- , I am not that familiar with adding tests, but I have tried to add some. If have also tried addressing your review comments. Please have a look and suggest changes if any.

Edit :- After pushing an commit the coverage passed but is now failing :confused: I not really familiar with this. I need some help here.

With Best Regards, Dibya Prakash Das

dibyadas commented 7 years ago

Hi @thinkingserious, I thought it would be good, if you could take a look at this. I am kind of stuck here. The code coverage passed and then failed for reasons I do not know. I thought maybe you could help me with this.

With Regards, Dibya Prakash Das

thinkingserious commented 7 years ago

This looks good to me @dibyadas, what do you think @w-?

w- commented 7 years ago

I'm ok with this.

thinkingserious commented 7 years ago

Hello @dibyadas,

Thanks again for the PR!

We want to show our appreciation by sending you some swag. Could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

dibyadas commented 7 years ago

Hi @thinkingserious, I have filled up the from. Thanks a lot! With Regards, Dibya Prakash Das

iandouglas commented 7 years ago

Per https://github.com/sendgrid/sendgrid-python/issues/323 if we could get examples of these awesome new exceptions in the README so other devs don't need to go surfing into tests to see examples of exceptions and what can cause them, I think that'd be super helpful.