{"issue":{"state":"closed","pull_request":{"diff_url":"https://github.com/nov/paypal-express/pull/20.diff","html_url":"https://github.com/nov/paypal-express/pull/20","patch_url":"https://github.com/nov/paypal-express/pull/20.patch"},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/f0b6cad84e199bbd863bf7459ff98870?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f0b6cad84e199bbd863bf7459ff98870","url":"https://api.github.com/users/pda","login":"pda","id":15759},"updated_at":"2011-10-31T05:07:21Z","labels":[],"assignee":null,"comments":2,"closed_at":"2011-10-31T05:06:05Z","url":"https://api.github.com/repos/nov/paypal-express/issues/20","body":"It's very frustrating getting exceptions like \"PayPal API Error\" without any hint what went wrong. This is especially true when the errors originate with a third party and may not be reproducible.\r\n\r\nOf course it's possible to guard every call to paypal-express with rescue code picking apart the exception to log/report/alert the actual reason.\r\n\r\nHowever it would be nice if paypal-express gave more helpful errors in the first place.\r\n\r\nThis patch to APIError builds a message based on the short_messages of the individual line items, as long as they are present. Otherwise it falls back to the default \"PayPal API Error\" message.\r\n\r\nWhat do you think?\r\n\r\nPS: Thanks for writing paypal-express! :)","html_url":"https://github.com/nov/paypal-express/issues/20","number":20,"title":"Meaningful details in APIError#message","id":2093969,"created_at":"2011-10-31T04:53:08Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/48ae3f36c0d73d2fa0f07f99ed5f66fd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"48ae3f36c0d73d2fa0f07f99ed5f66fd","url":"https://api.github.com/users/nov","login":"nov","id":27299},"updated_at":"2011-10-31T05:07:21Z","url":"https://api.github.com/repos/nov/paypal-express/issues/comments/2573647","body":"And now it's in paypal-express v0.4.1","id":2573647,"created_at":"2011-10-31T05:07:21Z"}}