Skip to content

Improved response handling none json error payload#32

Open
DodoMorph wants to merge 9 commits intodikhan:masterfrom
DodoMorph:feature/improved-response-handling-noJson
Open

Improved response handling none json error payload#32
DodoMorph wants to merge 9 commits intodikhan:masterfrom
DodoMorph:feature/improved-response-handling-noJson

Conversation

@DodoMorph
Copy link
Copy Markdown

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
Copy Markdown
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-bms
Copy link
Copy Markdown

@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