Forceu / barcodebuddy

Barcode system for Grocy
GNU Affero General Public License v3.0
433 stars 58 forks source link

Fix AH invalid refresh token handling #235

Closed roel-de-vries closed 8 months ago

roel-de-vries commented 8 months ago

Hi there, again 😅

Back with another small fix. The invalid refresh token handling was wrong for the AH provider.

I placed it inside a try-catch, not knowing the $this->execute is already wrapped in a try-catch with a return null fallback. So the AH provider never went in the catch, where the handling should've happen.

Forceu commented 8 months ago

Thanks :) that it weird, I would have thought that the inner try clause would catch it...

roel-de-vries commented 8 months ago

The inner try-catch of $this->execute did/does actually catch the errors. But they aren't re-thrown, so the extra try-catch in the Albert Heijn handler never got an error to handle - the response for failed execute calls is null and therefore valid :)

Forceu commented 8 months ago

Ah that makes sense, thank you