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

Problem with accessing onboarding errors #42

Open
germanow opened this issue Jul 26, 2021 · 0 comments
Open

Problem with accessing onboarding errors #42

germanow opened this issue Jul 26, 2021 · 0 comments
Assignees

Comments

@germanow
Copy link
Contributor

I want to implement proper error handling of onboarding errors. For this I need to get the error code from the response.

I have this code:

try {
    $onboardService = new SecuredOnboardService($this->getEnvironment(), $this->getHttpClient());
    $onboardParameters = $this->createOnboardParameters($regcode, $sfOrgId);
    $onboardResponse = $onboardService->onboard($onboardParameters, $this->appPrivateKey);
} catch (OnboardException $e) {
    // error handling
}

The problem is that $e->getMessage() returns this message:

Client error: `POST https://agrirouter-registration-service-hubqa-eu10.cfapps.eu10.hana.ondemand.com/api/v1.0/registration/onboard/request` resulted in a `400 Bad Request` response:
{"error":{"code":"0114","message":"Endpoint has recently been revoked. Please wait 3 minutes 44 seconds before trying to (truncated...)

Message was truncated by guzzle and there is no way to get the original response or code.

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

3 participants