steempb / steempb.com

The STEEM Peanut Butter Website
http://steempb.com
Other
1 stars 1 forks source link

Checkout Errors Too Opaque #37

Open pettazz opened 10 years ago

pettazz commented 10 years ago

On the initial checkout form, we have a number of different errors that we could run into, Ticket validation errors, invalid email address format, unable to send request, etc. Some are recoverable and some are not, so we should give the user more information, and if it's a form error, give them the option to correct it without requiring them to start over.

pettazz commented 10 years ago

checkout.php service call should set status to an appropriate HTTP error code but also set an error value in response json with an internal error "shortcode" along with any specific error message string if applicable:

[{'error': {'code': 'invalid_ticket', 'message': '"BUTTS" is not a valid Ticket'}}]

Frontend code will decide based on HTTP status whether to look for error and then whether to use the message passed from the backend based on code.

pettazz commented 10 years ago

The above comment is now implemented, but we want to do even better. Every request should have a uuid that we can easily follow through the logs to track every step of the process for troubleshooting. The frontend can provide this as part of an "error code" so we can dig into their specific checkout process.