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

No status send in error exception #29

Closed
przemeko opened this issue Jun 27, 2017 · 2 comments
Closed

No status send in error exception #29

przemeko opened this issue Jun 27, 2017 · 2 comments

Comments

@przemeko
Copy link

Error handling api docs says that every error response contains these data:

{
    "errorType" : "security",
    "errorCode" : "901",
    "message" : "Invalid Merchant Account",
    "status" : "403"
}

But in library method that handle this kind of errors (handleResultError in CurlClient) there are forwarded ONLY message and errorCode.

if(isset($decodeResult['message']) && isset($decodeResult['errorCode'])) {
    $logger->error($decodeResult['errorCode'] . ': ' . $decodeResult['message']);
    throw new \Adyen\AdyenException($decodeResult['message'], $decodeResult['errorCode']);
}

It would be a lot easier to handle errors if exceptions throws by "adyen-php-api-library" contains also status field.

Regards
Przemek

@przemeko przemeko changed the title No status send No status send in error exception Jun 27, 2017
@rikterbeek
Copy link
Contributor

Hi @przemeko,

Thanks for you comment. Yes this makes sense, see the change above. Is this change the solution that you were looking for?

Regards,
Rik
Adyen

@przemeko
Copy link
Author

przemeko commented Jul 4, 2017

Hi @rikterbeek

Yes, it solves issue. Great job!

Regards
Przemek

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