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

I want to get a request when an API error occurs #428

Closed
tnkwmit opened this issue Jun 4, 2020 · 1 comment
Closed

I want to get a request when an API error occurs #428

tnkwmit opened this issue Jun 4, 2020 · 1 comment

Comments

@tnkwmit
Copy link

tnkwmit commented Jun 4, 2020

If I get an unexpected error when running FCM v1 API, I would like to get the request information for contacting support.
However, if response exists, $previous is set to null and RequestException cannot be obtained.

if ($response = $e->getResponse()) {
return $this->convertResponse($response);
}

Is it possible to set RequestException in the $previous even if response exists?

        if ($response = $e->getResponse()) {
            return $this->convertResponse($response, $e);
        }
@jeromegamez
Copy link
Member

Good catch @tnkwmit! Of course it's possible 😅and will be included in the next release (see 994ec59)

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