mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
Complete addition of cause argument
As mentioned in #296 error cast are now added with cause argument. Signed-off-by: Christian <chr.korber@gmail.com>
This commit is contained in:
parent
1e241c7926
commit
a0615bda42
4 changed files with 5 additions and 5 deletions
|
|
@ -49,7 +49,7 @@ const useAppleLogin = (): [() => Promise<AppleLoginResponse>, () => void] => {
|
|||
timeout.current && clearTimeout(timeout.current);
|
||||
timeout.current = setTimeout(() => {
|
||||
if (tries >= MAX_TRIES)
|
||||
return reject(new Error('Failed to authenticate with Apple'));
|
||||
return reject(new Error('Failed to authenticate with Apple', { cause: 'Number of allowed tries exceeded!' }));
|
||||
|
||||
tries++;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const useFacebookLogin = () => {
|
|||
timeout.current && clearTimeout(timeout.current);
|
||||
timeout.current = setTimeout(() => {
|
||||
if (tries >= MAX_TRIES)
|
||||
return reject(new Error('Failed to authenticate with facebook'));
|
||||
return reject(new Error('Failed to authenticate with facebook', { cause: 'Number of allowed tries exceeded!' }));
|
||||
|
||||
tries++;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const initialize = () => {
|
|||
if (castAPIAvailable) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error('window.cast api not available'));
|
||||
reject(new Error('window.cast api not available', { cause: 'castAPIAvailable is null.' }));
|
||||
}
|
||||
}
|
||||
if (castAPIAvailable !== null) {
|
||||
|
|
@ -167,7 +167,7 @@ function ChromecastTransport() {
|
|||
});
|
||||
}));
|
||||
} else {
|
||||
return Promise.reject(new Error('Session not started'));
|
||||
return Promise.reject(new Error('Session not started', { cause: 'castSession is null.' }));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ function Shell() {
|
|||
} catch (e) {
|
||||
console.error(e);
|
||||
active = false;
|
||||
error = new Error(e);
|
||||
error = new Error('Failed to initialize shell transport', { cause: e });
|
||||
starting = false;
|
||||
onStateChanged();
|
||||
transport = null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue