Closed staffxxx closed 4 years ago
Hello,
Currently there is no way, but it will be in v2 release, until that you can parse the message and use json decode.
Thank you norkunas for your answer. Do not have a solution while waiting for version 2?
When do you think version 2 will be released
Maybe before christmas :) We could update for now code to set the original exception as previous, so you could access it with request/response data. Wanna submit a PR?
I do not understand Wanna submit to PR?
Do you want to contribute submitting a pull request with code changes?
Yes I want ;)
I guess you aren't familiar with git? :) If that's the case you can read more about it here https://github.com/firstcontributions/first-contributions
v2 is released.
I wanted to recover the error so I did this
try { //code here } catch(Exception $e) { echo $e->getMessage(); }
This does not show a result : Client error:
DELETE https://onesignal.com/api/v1/players/50?app_id=a20576b6-5348-4df7-a56a-26resulted in a
400 Bad Requestresponse: {"errors":["No user with this id found"]}
How to recover the response in array?
Thank you