Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Fix error display #174

Merged
merged 5 commits into from
Oct 16, 2018
Merged

Fix error display #174

merged 5 commits into from
Oct 16, 2018

Conversation

alepore
Copy link
Contributor

@alepore alepore commented Jul 6, 2018

We currently don't display transaction errors on the checkout. This behaviour is very confusing for the user.
Even if the user may not be able to fix the error by itself, we should make clear that something bad happened.

This is the result:
screen shot 2018-07-06 at 16 06 55

alepore added 2 commits July 6, 2018 16:03
So the basic functionality is always available, even without the
`braintree_errors` partial.
Errors are not only used for hosted fields but also for Paypal, for example.
@alepore alepore force-pushed the fix-error-display branch from 47c1a1c to 18fed62 Compare July 6, 2018 14:07
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should just display the error message and don't prepend the default error, but display that if no other error message could be found.

var errorText = errors.join(", ");

console.error("Error submitting transaction: " + errorText);
SolidusPaypalBraintree.showError(BraintreeError.DEFAULT + " " + errorText);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A validation error is not "Bad", so we should not prepend all errors with the default message.

@alepore alepore force-pushed the fix-error-display branch from 18fed62 to 20638da Compare July 10, 2018 14:52
@alepore
Copy link
Contributor Author

alepore commented Jul 10, 2018

@tvdeyen 👍 i agree.
I removed the prefix, and made the default message the fallback.

@tvdeyen
Copy link
Member

tvdeyen commented Jul 10, 2018

@alepore thanks. Build is failing because of rubocop. 😢

We really should not run rubocop on Travis CI, but use Hound for this.

@tvdeyen
Copy link
Member

tvdeyen commented Jul 10, 2018

@alepore #176

Add suggested puma dependency
@alepore alepore force-pushed the fix-error-display branch from aafc4b3 to db63748 Compare July 12, 2018 12:09
Use the driver provided by capybara.
@alepore alepore force-pushed the fix-error-display branch from db63748 to 273ca6f Compare July 12, 2018 12:44
@tvdeyen
Copy link
Member

tvdeyen commented Jul 18, 2018

@alepore one final rebase we are good to go. Thanks

@tvdeyen tvdeyen merged commit dbcee4e into solidusio:master Oct 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants