Skip to content

Commit 01e3475

Browse files
committed
Improve subscription error handling
Signed-off-by: Zoltan Kis
1 parent ec65fa7 commit 01e3475

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

index.html

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,7 @@

The observeProperty() method

14781478
Otherwise resolve |promise|.
14791479
li>
14801480
<li>
1481-
Whenever the underlying platform receives a notification for this
1481+
Whenever the underlying platform detects a notification for this
14821482
subscription with a new <a>Propertya> value |value|,
14831483
run the following sub-steps:
14841484
<ul>
@@ -1493,15 +1493,19 @@

The observeProperty() method

14931493
ul>
14941494
li>
14951495
<li>
1496-
Whenever the underlying platform receives an error notification for
1497-
this subscription with an |error:Error|, run the following sub-steps:
1496+
Whenever the underlying platform detects an error for
1497+
this subscription, run the following sub-steps:
14981498
<ul>
14991499
<li>
15001500
If the error is irrecoverable and stops the subscription, set
15011501
|subscription|'s |active| to `false` and suppress further notifications.
15021502
li>
15031503
<li>
1504-
If |onerror| is a {{Function}}, invoke it with |error|.
1504+
Let |error| be a new {{NetworkError}} and set its |message|
1505+
to reflect the underlying error condition.
1506+
li>
1507+
<li>
1508+
If |onerror| is a {{Function}}, invoke it with |error|.
15051509
li>
15061510
ul>
15071511
li>
@@ -1625,7 +1629,7 @@

The subscribeEvent() method

16251629
Otherwise resolve |promise|.
16261630
li>
16271631
<li>
1628-
Whenever the underlying platform receives a notification for this
1632+
Whenever the underlying platform detects a notification for this
16291633
<a>Eventa> subscription, run the following sub-steps:
16301634
<ol>
16311635
<li>
@@ -1636,13 +1640,17 @@

The subscribeEvent() method

16361640
ol>
16371641
li>
16381642
<li>
1639-
Whenever the underlying platform receives an error notification for
1640-
this subscription with an |error:Error|, run the following sub-steps:
1643+
Whenever the underlying platform detects an error for
1644+
this subscription, run the following sub-steps:
16411645
<ul>
16421646
<li>
16431647
If the error is irrecoverable and stops the subscription, set
16441648
|subscription|'s |active| to `false` and suppress further notifications.
16451649
li>
1650+
<li>
1651+
Let |error| be a new {{NetworkError}} and set its |message|
1652+
to reflect the underlying error condition.
1653+
li>
16461654
<li>
16471655
If |onerror| is a {{Function}}, invoke it with |error|.
16481656
li>

0 commit comments

Comments
 (0)