Open Bug 1494917 Opened 6 years ago Updated 2 years ago

PaymentResponse.retry({}) and PaymentResponse.retry() should not return AbortError.

Categories

(Core :: DOM: Web Payments, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: edenchuang, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [webpayments-reserve])

Attachments

(2 files, 2 obsolete files)

In current implmentation. PaymentResponse.retry({}) and PaymentResponse.retry() return a rejected promise with AbortError. This is because no errors retry might be a not good UX for user.

However, UX team has a perfect solution for it. I am going to remove these code, and let PaymentResponse() and PaymentResponse({}) can be handled by UI component.
Assignee: nobody → echuang
Priority: -- → P2
Status: NEW → ASSIGNED
Flags: qe-verify?
Priority: P2 → P1
Whiteboard: [webpayments-reserve]
Please don't merge this yet. It's come up for discussion at the W3C and we've not concluded what to do yet.
Marcos, Is any updates on the spec discussion?
Flags: needinfo?(mcaceres)
Yes, but I've not had time to update the spec - sorry :( I'll make this top priority once I'm back from TPAC (in a week).
Flags: needinfo?(mcaceres)
Attachment #9015206 - Flags: review?(amarchesini) → review+
See Also: → 1499992
Priority: P1 → P2
Flags: qe-verify? → qe-verify-
So, the conclusion was on the spec side was to console.warn on the bogus cases.
Priority: P2 → P1
Update the patch according to the spec modification.

For calling PaymentResponse.retry with empty error fields and with non-empty payer errors if corresponding PaymentOptions.requestPayerXXX is false, warning on browser console to inform the developer.
Attachment #9015206 - Attachment is obsolete: true
Attachment #9029487 - Flags: review?(amarchesini)
Attachment #9029488 - Flags: review?(amarchesini)
Comment on attachment 9029487 [details] [diff] [review]
Warning on brower console when calling PaymentResponse.retry with empty errros or non-empty payer errors if requestPayerXXX is false.

Review of attachment 9029487 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/locales/en-US/chrome/dom/dom.properties
@@ +353,4 @@
>  IDBOpenDBOptions_StorageTypeWarning=The ‘storage’ attribute in options passed to indexedDB.open is deprecated and will soon be removed. To get persistent storage, please use navigator.storage.persist() instead.
>  DOMQuadBoundsAttrWarning=DOMQuad.bounds is deprecated in favor of DOMQuad.getBounds()
>  UnsupportedEntryTypesIgnored=Ignoring unsupported entryTypes: %S.
> +# LOCALIZATION NOTE: Do not translate "PaymentRequest". The %S is the id of the PaymentRequest.

LOCALIZATION NODE(PaymentRequestRetryWithEmptyErrors): ...

@@ +355,5 @@
>  UnsupportedEntryTypesIgnored=Ignoring unsupported entryTypes: %S.
> +# LOCALIZATION NOTE: Do not translate "PaymentRequest". The %S is the id of the PaymentRequest.
> +PaymentRequestRetryWithEmptyErrors=retrying the PaymentRequest(%S) with empty error fields.
> +# LOCALIZATION NOTE: Do not translate "PaymentRequest", "PayerErrorFields.name" and "PaymentOptions.requestPayerName". The %S is the id of the PaymentRequest
> +PaymentRequestRetryWithNonemptyPayerErrorName=retrying the PaymentRequest(%S) with non-empty PayerErrorFields.name, but PaymentOptions.requestPayerName is false. 

extra space.
Attachment #9029487 - Flags: review?(amarchesini) → review+
Attachment #9029488 - Flags: review?(amarchesini) → review+
Update patch according to reviewer's comment.
Update patch with new C++ coding style.
Attachment #9029487 - Attachment is obsolete: true
Attachment #9031459 - Flags: review+
Keywords: checkin-needed
Pushed by ebalazs@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/14cfc544bea0
mochitest test updation. r=baku
https://hg.mozilla.org/integration/mozilla-inbound/rev/1cdcc397c971
Warning to console when calling PaymentResponse.retry() with improper error fields. r=baku
Keywords: checkin-needed
Flags: needinfo?(echuang)
Priority: P1 → P3
Assignee: echuang → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: