Closed AntonDriemin closed 9 years ago
Quants,
See Anton's example. If you do a BOM::Product::Transaction->new(..)->buy, with an unsuccessful contract request, you get a whole array of messages. Should they all be shown to the client?
Or maybe just the last one?
we should show primary_validation_error.
@frank-binary can you please do?
yes, will do. thanks jb.
I did a minor variation to junbon's patch.
The answer to Anton's question is now 'the first message reported is the primary_validation_error. This is the one to show to the client'.
I retained the old behaviour where the remaining messages if any are still reported anyway.. a conversation with Matt long ago, it emerged that smart clients may be able to do clever things if they can see the other messages too.
This is tested and is in master; it will go live with the next release by anybody.
@frank-binary Example of valid request: http://rmg-prod.apigee.net/v1/binary/contract/FLASHD/R_100/sec/30/USD/190/0/0/0 invalid: http://rmg-prod.apigee.net/v1/binary/contract/FLASHD/R_100/sec/30/USD/190/1/0/0 and response is:
which error message should I display to user?