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

Status not documented #20

Open
frioux opened this issue Jan 27, 2016 · 1 comment
Open

Status not documented #20

frioux opened this issue Jan 27, 2016 · 1 comment

Comments

@frioux
Copy link

frioux commented Jan 27, 2016

The docs say: "message() sends a message to Pushover and returns a scalar reference representation of the message status." By testing it I found that it's actually a hash reference. More importantly, the Pushover api docs mention checking for 500's (https://pushover.net/api#friendly) and I cannot see how to do that with this tool. Ideas?

@hakamadare
Copy link
Owner

hello! i apologize for the delay in reponse :(

the bad news is that i can't immediately see an easy way for you to inspect the HTTP response code; that is hidden under several layers of abstraction. however, the good news is that iirc a 500 response will not include valid JSON, which means the JSON parser will fail to decode it, and then it will croak. you can run message() inside an eval and inspect the return value to see if it succeeded.

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

No branches or pull requests

2 participants