|
2 | 2 | <html>
|
3 | 3 | <head>
|
4 | 4 | <meta charset='utf-8'>
|
5 |
| - <title>opossum 4.1.0 | Documentation</title> |
| 5 | + <title>opossum 4.2.0 | Documentation</title> |
6 | 6 | <meta name='description' content='A fail-fast circuit breaker for promises and callbacks'>
|
7 | 7 | <meta name='viewport' content='width=device-width,initial-scale=1'>
|
8 | 8 | <link href='assets/bass.css' rel='stylesheet'>
|
|
15 | 15 | <div id='split-left' class='overflow-auto fs0 height-viewport-100'>
|
16 | 16 | <div class='py1 px2'>
|
17 | 17 | <h3 class='mb0 no-anchor'>opossum</h3>
|
18 |
| - <div class='mb1'><code>4.1.0</code></div> |
| 18 | + <div class='mb1'><code>4.2.0</code></div> |
19 | 19 | <input
|
20 | 20 | placeholder='Filter'
|
21 | 21 | id='filter-input'
|
@@ -44,6 +44,17 @@ <h3 class='mb0 no-anchor'>opossum</h3>
|
44 | 44 |
|
45 | 45 | <div class='toggle-target display-none'>
|
46 | 46 |
|
| 47 | + <ul class='list-reset py1-ul pl1'> |
| 48 | + <li class='h5'><span>Static members</span></li> |
| 49 | + |
| 50 | + <li><a |
| 51 | + href='#circuitbreakerisourerror' |
| 52 | + class='regular pre-open'> |
| 53 | + .isOurError |
| 54 | + </a></li> |
| 55 | + |
| 56 | + </ul> |
| 57 | + |
47 | 58 |
|
48 | 59 | <ul class='list-reset py1-ul pl1'>
|
49 | 60 | <li class='h5'><span>Instance members</span></li>
|
@@ -896,6 +907,82 @@ <h3 class='fl m0' id='circuitbreaker'>
|
896 | 907 |
|
897 | 908 |
|
898 | 909 |
|
| 910 | + <div class='py1 quiet mt1 prose-big'>Static Members</div> |
| 911 | + <div class="clearfix"> |
| 912 | + |
| 913 | + <div class='border-bottom' id='circuitbreakerisourerror'> |
| 914 | + <div class="clearfix small pointer toggle-sibling"> |
| 915 | + <div class="py1 contain"> |
| 916 | + <a class='icon pin-right py1 dark-link caret-right'>▸</a> |
| 917 | + <span class='code strong strong truncate'>isOurError(error)</span> |
| 918 | + </div> |
| 919 | + </div> |
| 920 | + <div class="clearfix display-none toggle-target"> |
| 921 | + <section class='p2 mb2 clearfix bg-white minishadow'> |
| 922 | + |
| 923 | + |
| 924 | + |
| 925 | + <p>Returns true if the provided error was generated here. It will be false |
| 926 | +if the error came from the action itself.</p> |
| 927 | + |
| 928 | + <div class='pre p1 fill-light mt0'>isOurError(error: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></div> |
| 929 | + |
| 930 | + |
| 931 | + |
| 932 | + |
| 933 | + |
| 934 | + |
| 935 | + |
| 936 | + |
| 937 | + |
| 938 | + |
| 939 | + |
| 940 | + <div class='py1 quiet mt1 prose-big'>Parameters</div> |
| 941 | + <div class='prose'> |
| 942 | + |
| 943 | + <div class='space-bottom0'> |
| 944 | + <div> |
| 945 | + <span class='code bold'>error</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a>)</code> |
| 946 | + The Error to check. |
| 947 | + |
| 948 | + </div> |
| 949 | + |
| 950 | + </div> |
| 951 | + |
| 952 | + </div> |
| 953 | + |
| 954 | + |
| 955 | + |
| 956 | + |
| 957 | + |
| 958 | + |
| 959 | + <div class='py1 quiet mt1 prose-big'>Returns</div> |
| 960 | + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>: |
| 961 | + true if the error was generated here |
| 962 | + |
| 963 | + |
| 964 | + |
| 965 | + |
| 966 | + |
| 967 | + |
| 968 | + |
| 969 | + |
| 970 | + |
| 971 | + |
| 972 | + |
| 973 | + |
| 974 | + |
| 975 | + |
| 976 | + |
| 977 | + |
| 978 | +</section> |
| 979 | + |
| 980 | + </div> |
| 981 | + </div> |
| 982 | + |
| 983 | +</div> |
| 984 | + |
| 985 | + |
899 | 986 |
|
900 | 987 |
|
901 | 988 | <div class='py1 quiet mt1 prose-big'>Instance Members</div>
|
@@ -1818,7 +1905,9 @@ <h3 class='fl m0' id='circuitbreaker'>
|
1818 | 1905 | <div class='py1 quiet mt1 prose-big'>Returns</div>
|
1819 | 1906 | <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><any></code>:
|
1820 | 1907 | promise resolves with the circuit function's return
|
1821 |
| -value on success or is rejected on failure of the action. |
| 1908 | +value on success or is rejected on failure of the action. Use isOurError() |
| 1909 | +to determine if a rejection was a result of the circuit breaker or the |
| 1910 | +action. |
1822 | 1911 |
|
1823 | 1912 |
|
1824 | 1913 |
|
|
0 commit comments