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

Better Error Handler #25

Closed
vinkla opened this issue Sep 21, 2015 · 6 comments
Closed

Better Error Handler #25

vinkla opened this issue Sep 21, 2015 · 6 comments
Assignees
Milestone

Comments

@vinkla
Copy link
Contributor

vinkla commented Sep 21, 2015

Today our premium account had ended and we had no idea what was going on until I tried making a request directly against the Pushwoosh API. The answer from the Pushwoosh API was:

{#363
  +"status_code": 210
  +"status_message": "This feature is available for Premium accounts only"
  +"response": null
}

Though, this is what I got back from this library:

ErrorException array_key_exists() expects parameter 2 to be array, null given
    vendor/gomoob/php-pushwoosh/src/main/php/Gomoob/Pushwoosh/Model/Response/CreateMessageResponse.php:43

Maybe we can return the error messages whenever the Pushwoosh API return 210?

@bgaillard bgaillard added this to the 1.0.6 milestone Oct 13, 2015
@bgaillard bgaillard self-assigned this Oct 13, 2015
@bgaillard
Copy link
Member

Hi @vinkla, this error should have been fixed with #13.

Its strange to encounter this problem again, in the response you provided the JSON response, what is the HTTP response code associated to the request ? Is it a 4XX or 5XX response code ?

If it is I think your problem is related to issue #24.

We'll improve error management in version 1.0.6 to fixe those problems.

@vinkla
Copy link
Contributor Author

vinkla commented Oct 14, 2015

I can't really remember the response and it is now quite hard to test since my account now is paid. I also think that could be related to #24

@bgaillard
Copy link
Member

Ok, I think the problem you describe is fixed in version 1.0.5, but we made an error while publishing this version because its not on packagist https://packagist.org/packages/gomoob/php-pushwoosh.

So I suppose you were using version 1.0.4 which does not include the fix, its related to #19.

I'll publish version 1.0.6 today and I think it will fix this problem definitly.

@vinkla
Copy link
Contributor Author

vinkla commented Oct 14, 2015

Aah, that is probably why. Good that we found it then.

@vinkla
Copy link
Contributor Author

vinkla commented Oct 14, 2015

Have you setup auto publishing for this repo on Packagist? Or do you do it manually?

@bgaillard
Copy link
Member

Yes, I think the problem was that the version was not equal to the GIT tag in the composer.json file.

We've just published a new 1.0.6 version which should fix those problems.

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

No branches or pull requests

2 participants