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

Improve error reporting #19

Open
morgoth opened this issue Sep 29, 2015 · 1 comment
Open

Improve error reporting #19

morgoth opened this issue Sep 29, 2015 · 1 comment

Comments

@morgoth
Copy link

morgoth commented Sep 29, 2015

Currently when error is returned its body contains json as string https://github.com/paymill/paymill-ruby/blob/master/lib/paymill.rb#L50
It would much more helpful to have more structured error that contains fields from

{
    "exception":"subscription_not_found",
    "error":"Subscription not found"
}
@morgoth
Copy link
Author

morgoth commented Sep 29, 2015

I found very weird case.
I'm using fake CC with 5105105105105100 to have error response as described in https://developers.paymill.com/guides/reference/testing.html

I get error paymill, during creating Payment::Transaction, but the body of response is a regular json of transaction, something like:

{
    "data":{
        "id":"tran_id",
        "amount":2990,
                ....
        }
}

Does anyone know what can be expected in response body of error?

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

1 participant