Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved response handling none json error payload #32

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

DodoMorph
Copy link

Hi we are a happy user of your pagerduty client, but I didn't like the verbose exceptions in the log when someone uses a wrong pd key. So I hope you agree to parse json payload only when it returns json. with OK, ACCEPT or CREATED.

Sorry for not knowing your preferred code formatter

@DodoMorph
Copy link
Author

Your Impl assumes a proper json payload but PagerDuty sends "InvalidRoutingKey" string.
I implemented handling for both scenarios, so If they fix the error payload it works as well.
Added additional unit test to simulate current scenario.

Regards,

Dodo

@aravind-farmint
Copy link

@dikhan Are you still maintaining this project ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants