Closed afarazit closed 10 years ago
The exception wraps the previous exception which contains the real reason (see https://github.com/matthiasnoback/microsoft-translator/blob/master/src/MatthiasNoback/MicrosoftOAuth/AccessTokenProvider.php#L86), You can retrieve it by calling $exception->getPrevious()
.
By the way, in such cases I would recommend using Xdebug, to be able debug the process step by step.
Cheers for the quick reply
You're welcome!
I had similar error, which was due to SSL error. Fix was to use:
$browser = new Browser();
$browser->getClient()->setVerifyPeer(false);
@paazmaya This does not fix things, but instead introduces a security vulnerability. Turning of peer verification means that the validity of the SSL certificate will not be checked anymore. If your machine can not verify the validity by itself, it's probably missing some configuration. You should fix it at that level, not in the code.
@matthiasnoback Thanks for the note, will look at SSL error as it is anyhow Microsoft server where the request is made to...
I'm getting a
RequestFailedException
with reasonRequest failed
, can you update the library to provide more info about this issue? I can't figure out why it's failing.