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

500 Doesn't return an error #330

Open
kacperPankiewicz98 opened this issue Jul 13, 2022 · 1 comment
Open

500 Doesn't return an error #330

kacperPankiewicz98 opened this issue Jul 13, 2022 · 1 comment

Comments

@kacperPankiewicz98
Copy link

Hi there!

I'm trying to get products with your API but I keep running into the following error:

In HttpClient.php line 343 and 344:
                                          
  Undefined property: stdClass::$error
  Undefined property: stdClass::$message

Sentry shows that the server is returning a 500 but without any kind of error message, instead the $errors variable contains the product with all its information.

@willfaulds
Copy link

willfaulds commented Oct 18, 2022

I've experienced some similar issues (throwing a server error rather than an exemption) using the demo code.

Fixed by swapping "HttpClientException" to "Throwable"

i.e.
try { ... } catch (Throwable $e) { ... }

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

No branches or pull requests

2 participants