<div dir="ltr"><div class="">
            <div class="">
                <p>Hello everyone,<br>
I had a problem that i can`t catch the exception from my code in ownCloud. <br>
here is the code :</p>

<div class=""><pre><span class="">try</span> <span class="">{</span>
            <span class="">$client</span><span class="">-></span><span class="">refreshToken</span><span class="">(</span><span class="">'xxxxx'</span><span class="">);</span>
            <span class="">var_dump</span><span class="">(</span><span class="">'success'</span><span class="">);</span>
 <span class="">}</span> <span class="">catch</span> <span class="">(</span><span class="">Exception</span> <span class="">$e</span><span class="">)</span> <span class="">{</span>
            <span class="">var_dump</span><span class="">(</span><span class="">$e</span><span class="">-></span><span class="">getMessage</span><span class="">());</span>
   <span class="">}</span>
</pre></div>

<p>I try this code outside ownCloud and ig can get the Exception: <br>
Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" }'</p>

<p>All this time i check the exception only from ownCloud.log in settings/admin.<br>
Actually is this some bug from ownCloud or there is an API/class that can be used to get the Exception??</p>

<p>Thank you,</p>
            </div>
          </div></div>